Re: Question about wal_compression and what to expect

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Question about wal_compression and what to expect
Дата
Msg-id CAMkU=1zR+w=Zjh_UKTs5hnD5LMRK0ct1uhZ6p3zNFmE_V_oYtw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Question about wal_compression and what to expect  (Sean O'Grady <sean@thingee.com>)
Ответы Re: Question about wal_compression and what to expect  (Sean O'Grady <sean@thingee.com>)
Список pgsql-admin
On Wed, Jun 21, 2023 at 9:51 AM Sean O'Grady <sean@thingee.com> wrote:
Yes, my question was essentially do I need to separately compress WAL files for storage/archiving even with wal_compression set. So, I think you've answered my question.

The internal compression has to compress each record in isolation, which is not nearly as good as compressing the entire file as there are patterns that exist between records not just within records.  So yes, you can still usefully compress the files for archival.  But if that is your main goal, then maybe you should turn off wal_compression, as it actually interferes with the whole-file compression.  Compressing just once at the whole-file level gives me better overall compression than compression both internally and then whole-file.

You should test this for yourself in your own data, as compressibility is not uniform over all work loads.  But you need to make sure you do the test correctly, compressing the same amount of "work" for each set-up.  When you have wal_compression on, more "work" should fit into each WAL file, so just compressing the same number of WAL files will not give you a fair comparison.

Cheers,

Jeff

В списке pgsql-admin по дате отправления:

Предыдущее
От: Bhasker Bathini
Дата:
Сообщение: Re: Why do i need to install set_user extension if i can directly grant all required privileges to user?
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Why do i need to install set_user extension if i can directly grant all required privileges to user?