Thread: Re: compression in replication

Re: compression in replication

From
Andrey Borodin
Date:
Hi Massimo!


> 16 июня 2021 г., в 13:11, Massimo Ortensi <mortensi@unimaticaspa.it> написал(а):
>
> is there any way to compress the traffic for streaming replication ?

libpq compression is being discussed here [0]. When the patch will be committed subsequent PostgreSQL version will be
ableto benefit from protocol copmression. Replication traffic also will be compressed. If you wish, you can join
effortsas the reviewer of that patch. 


As for now, you can use compressed archive recovery - many solutions like WAL-G, pgBackRest, pg_probackup support
compressingWALs with decent compression algorithms. They also support parallel upload\download of WAL segments, while
replicationis TCP-based (serial). Keep in mind that archiving sends only at minimum one segment (16Mb by default) at a
time.Also, you will not be able to use features like synchronous commit. 

Thanks!

Best regards, Andrey Borodin.


[0] https://www.postgresql.org/message-id/flat/aad16e41-b3f9-e89d-fa57-fb4c694bec25%40postgrespro.ru