Thank you for the clarification. בתאריך 20 בנוב׳ 2017 14:28, "Michael Paquier" <michael.paqu...@gmail.com> כתב:
> On Mon, Nov 20, 2017 at 6:02 PM, Mariel Cherkassky > <mariel.cherkas...@gmail.com> wrote: > > This morning , I set the wal_keep_segments to 100 and I set the > > archive_timeout to 6 minutes. Now, after setting those settings and > starting > > the cluster wals switch is working fine and I didnt see that many wals > were > > However, doesnt the old wals should be deleted automaticly ? Can I > > delete archives safely ? > > Archives are useful if they can be used with a base backup which would > allow it to recover close to the point has created WAL activity, up to > the last finished segment to be precise. So if you have no base > backups or standbys (for example disconnected for a long) that would > use them, there is no point in keeping them. What defines the archive > and base backup retention is your data retention policy. Do not touch > the files of pg_xlog though, those are managed by PostgreSQL itself. > It is also good practice to put the archives on a different partition, > and to not have the archives in a sub-path of the main data folder as > you do as those would get included in all base backups taken. > -- > Michael >