Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary
От
Euler Taveira
Тема
Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary
Дата
Msg-id
66f58359-6241-47fd-bf25-4d105a00523c@www.fastmail.com
Ответ на
pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary (Bharath Rupireddy)
Список
Дерево обсуждения
pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary "Euler Taveira" <euler@eulerto.com>
Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary Stephen Frost <sfrost@snowman.net>
Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary) Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: pg_walcleaner - new tool to detect, archive and delete the unneeded wal files (was Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
On Thu, Dec 23, 2021, at 9:58 AM, Bharath Rupireddy wrote:
pg_archivecleanup currently takes a WAL file name as input to deletethe WAL files prior to it [1]. As suggested by Satya (cc-ed) inpg_replslotdata thread [2], can we enhance the pg_archivecleanup toautomatically detect the last checkpoint (from control file) LSN,calculate the lowest restart_lsn required by the replication slots, ifany (by reading the replication slot info from pg_logical directory),archive the unneeded (an archive_command similar to that of the oneprovided in the server config can be provided as an input) WAL filesbefore finally deleting them? Making pg_archivecleanup tool as anend-to-end solution will help greatly in disk full situations becauseof WAL files growth (inactive replication slots, archive commandfailures, infrequent checkpoint etc.).
pg_archivecleanup is a tool to remove WAL files from the *archive*. Are you
suggesting to use it for removing files from pg_wal directory too? No, thanks.
WAL files are a key component for backup and replication. Hence, you cannot
deliberately allow a tool to remove WAL files from PGDATA. IMO this issue
wouldn't occur if you have a monitoring system and alerts and someone to keep
an eye on it. If the disk full situation was caused by a failed archive command
or a disconnected standby, it is easy to figure out; the fix is simple.
В списке pgsql-hackers по дате отправления