Re: PostgreSQL 9.6 wals management

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-performance(at)postgresql(dot)org>
Subject: Re: PostgreSQL 9.6 wals management
Date: 2017-11-20 12:28:52
Message-ID: CAB7nPqQAfdhFzyoBOUtmSd+e4Dd1ztUhemgRTr7AuzpEZb-baA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Nov 20, 2017 at 6:02 PM, Mariel Cherkassky
<mariel(dot)cherkassky(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mariel Cherkassky 2017-11-20 12:56:27 Re: PostgreSQL 9.6 wals management
Previous Message Mariel Cherkassky 2017-11-20 09:02:40 PostgreSQL 9.6 wals management