Re: how to cleanup archive based on datetime

2018-10-10 Thread Martin Marques
El 10/10/18 a las 04:00, magodo escribió: > > 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

Re: how to cleanup archive based on datetime

2018-10-10 Thread Adrian Klaver
On 10/10/18 12:00 AM, magodo wrote: 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? That is dangerous, given that a WAL is important not based on its age but on whether it's content