| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Protocol Compression (fourth attempt) |
| Date: | 2026-09-29 14:06:39 |
| Message-ID: | 171E58B6-6B33-4880-9253-00450F4D92D6@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Anthonin,
On 29 Sep 2026, Anthonin Bonnefoy wrote:
> I've also taken a different approach for the implementation, so I
> haven't reused code from the previous attempts.
Could we combine our efforts on this?
Thanks, Michael, for linking my proposal. My goal is a minimal,
future-proof design: a small useful protocol and configuration
interface, with a clear way to negotiate extensions later. My takeaway
from the previous attempts is that expanding scope kept us from
agreeing on that core.
Your PQcommMethods layer looks like a good fit. The separate msg_buffer
avoids copying decompressed messages back into the input buffer, as my
prototype does. I would also like to keep your trace-based tests for
compressed messages and frame boundaries.
There are several choices I would simplify for v1:
- Multiple codecs, levels and long-distance matching. I would start
with Zstandard at its default level.
- Switching codecs within a session and identifying them in every
wrapper. Choosing once at startup avoids those state transitions.
- Compressing additional message types and listing their types in the
wrapper. Starting with DataRow and CopyData leaves other messages
visible to poolers without that extra metadata.
- GUCs for thresholds and batch sizes. We can improve the buffering
policy while keeping these choices internal.
- Configurable frame lifetime. I agree with your suggestion to remove
that option and settle on a mandatory reset rule for poolers.
I am open to using your patchset as the base and reducing its scope, or
taking your implementation ideas into mine. We can choose the base
once we agree on the common design.
Thank you!
Best regards, Andrey Borodin.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xuneng Zhou | 2026-09-29 14:08:28 | Re: test: avoid redundant standby catchup in 049_wait_for_lsn |
| Previous Message | Matheus Alcantara | 2026-09-29 13:54:28 | Re: [PATCH v1] Fix for Bug#19724 - ALTER TYPE ... ALTER ATTRIBUTE triggers internal error for base type of domain with check |