Re: Can PostgreSQL create new WAL files instead of reusing old ones? - Mailing list pgsql-general

From Vick Khera
Subject Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Date
Msg-id CALd+dccV7RQ+EZ9Q8UYy47qP+9V6jdtRiEvu+qzbHh5W9iHcQQ@mail.gmail.com
Whole thread Raw
In response to Re: Can PostgreSQL create new WAL files instead of reusing old ones?  (Jerry Jelinek <jerry.jelinek@joyent.com>)
Responses Re: Can PostgreSQL create new WAL files instead of reusing old ones?  (Adam Brusselback <adambrusselback@gmail.com>)
List pgsql-general
On Wed, Jun 20, 2018 at 1:35 PM, Jerry Jelinek <jerry.jelinek@joyent.com> wrote:
As Dave described in his original email on this topic, we'd like to avoid recycling WAL files since that can cause performance issues when we have a read-modify-write on a file that has dropped out of the cache.

I have implemented a small change to allow WAL recycling to be disabled. It is visible at:

I'd appreciate getting any feedback on this.


This looks so simple, yet so beneficial. Thanks for making it. Is there some other mechanism that already cleans out the old unneeded WAL files?  I recall there is something that does it when you start up after changing the number of files to keep, but I don't recall if that is tested over some loop regularly. 

Is there some way to make it auto-detect when it should be enabled? If not, please document that it should be used on ZFS and any other file system with CoW properties on files.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pgp_sym_decrypt() - error 39000: wrong key or corrupt data
Next
From: Adam Brusselback
Date:
Subject: Re: Can PostgreSQL create new WAL files instead of reusing old ones?