odoo/odoo#159253

Created by fw-bot
Merged at 61c7bba44990522d853bae25aa7899cb03c72e31

Statuses:

label
odoo-dev:saas-16.3-15.0-perf-3650618-pivi-XMjf-fw
head
df1b02056c0e603f527df9c74678c52fcb687e15
merged
1 year ago by Piryns Victor (pivi)
odoo/odoo
15.0 #154463
16.0 #159098
saas-16.3 #159253
saas-16.4 #159453
17.0 #159469
saas-17.1 #159569
saas-17.2 #159583
18.0
saas-18.1
saas-18.2
saas-18.3
saas-18.4
master #159591

[FW][FIX] bus: split large `NOTIFY` payloads

Description

On a database with heavy activity, it is possible for the payload size we pass for the NOTIFY query on the bus to be larger than what PostgreSQL allows by default, 8000 B. This limit is defined as src1 and is used to compare the size of the payload before processing src2

Fix

  • Binary split the payload into multiple chunks if it's exceeding the above-mentioned limit. The unit of splitting is a channel, so if the content of one channel itself is larger than said limit, it is not handled, but shouldn't occur under normal circumstances.
  • Introduce also a new ENV variable ODOO_NOTIFY_PAYLOAD_MAX_LENGTH to allow tweaking of the limit if they are running a handrolled custom PostgreSQL cluster.

Reference

opw-3650618


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #159098
Forward-Port-Of: #154463