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
Дата
Msg-id CALj2ACWrryWEbzn3gU9yqyarY5ptsUd8wrLwNgfv+Xn4tepRJQ@mail.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>)
Список pgsql-hackers
Hi,

pg_archivecleanup currently takes a WAL file name as input to delete
the WAL files prior to it [1]. As suggested by Satya (cc-ed) in
pg_replslotdata thread [2], can we enhance the pg_archivecleanup to
automatically detect the last checkpoint (from control file) LSN,
calculate the lowest restart_lsn required by the replication slots, if
any (by reading the replication slot info from pg_logical directory),
archive the unneeded (an archive_command similar to that of the one
provided in the server config can be provided as an input) WAL files
before finally deleting them? Making pg_archivecleanup tool as an
end-to-end solution will help greatly in disk full situations because
of WAL files growth (inactive replication slots, archive command
failures, infrequent checkpoint etc.).

Thoughts?

[1] - When used as a standalone program all WAL files logically
preceding the oldestkeptwalfile will be removed from archivelocation.
https://www.postgresql.org/docs/devel/pgarchivecleanup.html
[2] - https://www.postgresql.org/message-id/CAHg%2BQDc9xwN7EmuONT3T91pCqFG6Q-BCe6B-kM-by7r1uPEicg%40mail.gmail.com

Regards,
Bharath Rupireddy.



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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: more descriptive message for process termination due to max_slot_wal_keep_size
Следующее
От: Amul Sul
Дата:
Сообщение: Re: Multi-Column List Partitioning