[Postgres-xl-developers] Pooler cannot assume size of the messages for larger cluster. Fix.

Krzysztof Nienartowicz Krzysztof.Nienartowicz at unige.ch
Tue Feb 4 04:25:42 PST 2020


Hello,

We observed pooler protocol corruption when increased our cluster to 12 nodes and 1K max_connections setting.
It boiled down to pooler code assuming a single recv() call can get the full message with PIDs. With the above settings, we see PIDs buffer is reaching 51KB and recv() call getting ~34K resulting in "Incomplete message from client" error, even this is a Unix socket...
Attached patch adds another recv() before throwing "incomplete message" error to try to get the buffer and decorates pool protocol errors with some details. We should probably have a proper loop with recv() to get expected buffer instead the original single recv(). 
Added setsockopt() did not change behaviour for us, so can be removed probably.

Regards,
Krzysztof

-------------- next part --------------
A non-text attachment was scrubbed...
Name: postgres-xl-10_poolcomm_pool_recvpids.patch
Type: application/octet-stream
Size: 3894 bytes
Desc: not available
URL: <http://lists.postgres-xl.org/pipermail/postgres-xl-developers-postgres-xl.org/attachments/20200204/029f0e05/attachment.obj>


More information about the Postgres-xl-developers mailing list