Re: archive modules

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Robert Haas <robertmhaas@gmail.com>, "Bossart, Nathan" <bossartn@amazon.com>, David Steele <david@pgmasters.net>, Fujii Masao <masao.fujii@oss.nttdata.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Magnus Hagander <magnus@hagander.net>, Stephen Frost <sfrost@snowman.net>
Date: 2022-09-14T19:31:04Z
Lists: pgsql-hackers

Attachments

On 14.09.22 07:25, Michael Paquier wrote:
>>      removed or recycled until they are archived. If WAL archiving cannot keep up
>> -   with the pace that WAL is generated, or if <varname>archive_command</varname>
>> +   with the pace that WAL is generated, or if <varname>archive_library</varname>
>>      fails repeatedly, old WAL files will accumulate in <filename>pg_wal</filename>
>>
>> with
>>
>>      removed or recycled until they are archived. If WAL archiving cannot keep up
>>      with the pace that WAL is generated, or if <varname>archive_command</varname>
>>      with the pace that WAL is generated, or if <varname>archive_command</varname>
>>      or <varname>archive_library</varname>
>>      fail repeatedly, old WAL files will accumulate in <filename>pg_wal</filename>
> 
> Yep.  Some references to archive_library have been changed by 31e121
> to do exactly that.  There seem to be more spots in need of an
> update.

I don't see anything in 31e121 about that.

Here is a patch that addresses this.

Commits

  1. Disallow setting archive_library and archive_command at the same time

  2. Restore archive_command documentation

  3. Doc: improve explanation of when custom GUCs appear in pg_settings.

  4. doc: Add note about re-archiving of same WAL files in docs.

  5. In basic_archive tests, insist on wal_level='replica'.

  6. Allow archiving via loadable modules.

  7. Move the code to archive files via the shell to a separate file.