how to cleanup archive based on datetime

Поиск
Список
Период
Сортировка
От magodo
Тема how to cleanup archive based on datetime
Дата
Msg-id ca8e01bfc65c41ea223c3b57a8179c95f1a79ec4.camel@sina.com
обсуждение исходный текст
Ответы Re: how to cleanup archive based on datetime  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: how to cleanup archive based on datetime  (Martin Marques <martin.marques@2ndquadrant.com>)
Список pgsql-general
Hello,

I know there is a tool `pg_archivecleanup`, but it only accepts wal
filename. What if I want to clean up all archived wal before a
specified datetime?

Though I could check the ctime fo each wal and figure out which to
remove, but it looks like not a elegent way to do this.

Also I tried to parse each wal and compare with the specified datetime
in a binary-search way, but it is based on the fact that every COMMIT
time in wal is sequential, but it looks like not the case..

Hence I wonder what is the best practice for this task?

Thank you in advance!
---
Magodo




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

Предыдущее
От: magodo
Дата:
Сообщение: Re: pg9.6: PITR paused just after failover, need manual resume
Следующее
От: mo jia
Дата:
Сообщение: Question about advance confirmed_flush_lsn using logic replicationslot when there is no modification.