Re: [PERFORM] PostgreSQL 9.6 wals management - Mailing list pgsql-performance

From Mariel Cherkassky
Subject Re: [PERFORM] PostgreSQL 9.6 wals management
Date
Msg-id CA+t6e1=w_R=vc2e2JZR_20YgPXJWTM6KEZmBDovvnSy+-NM6tg@mail.gmail.com
Whole thread Raw
In response to Re: [PERFORM] PostgreSQL 9.6 wals management  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-performance
Thank you for the clarification. 

בתאריך 20 בנוב׳ 2017 14:28,‏ "Michael Paquier" <michael.paquier@gmail.com> כתב:
On Mon, Nov 20, 2017 at 6:02 PM, Mariel Cherkassky
<mariel.cherkassky@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

pgsql-performance by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PERFORM] PostgreSQL 9.6 wals management
Next
From: Stephen Frost
Date:
Subject: [PERFORM] Migration to pglister - Before