Re: compression in replication

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Massimo Ortensi <mortensi(at)unimaticaspa(dot)it>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: compression in replication
Date: 2021-06-28 10:36:25
Message-ID: A7581DEB-8ABC-4778-88B0-241394E03F12@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Massimo!

> 16 июня 2021 г., в 13:11, Massimo Ortensi <mortensi(at)unimaticaspa(dot)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 able to benefit from protocol copmression. Replication traffic also will be compressed. If you wish, you can join efforts as the reviewer of that patch.

As for now, you can use compressed archive recovery - many solutions like WAL-G, pgBackRest, pg_probackup support compressing WALs with decent compression algorithms. They also support parallel upload\download of WAL segments, while replication is 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message koff10 2021-06-28 11:12:26 Comparing 2 data base or 2 tables
Previous Message Yambu 2021-06-28 07:59:02 Re: Pgbadger