pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Steele <david@pgmasters.net>
To: Achilleas Mantzios <achill@matrix.gatewaynet.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Strange times in WAL files in archive directory (9.3)
Date: Tue, 24 Jan 2017 08:42:05 -0500
Message-ID: <beef18bc-861a-e14e-be32-fc9592d8b708@pgmasters.net> (raw)
In-Reply-To: <13126.1485264550@sss.pgh.pa.us>
References: <58871A66.306@matrix.gatewaynet.com>
	<58873609.4030004@matrix.gatewaynet.com>
	<13126.1485264550@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi Achilleas,

On 1/24/17 8:29 AM, Tom Lane wrote:
> Achilleas Mantzios <achill@matrix.gatewaynet.com> writes:
> 
>> 2) From now on, can we assume a monotonic relation between file names and creation times in order to base our maintenance scripts on this?
> 
> I wouldn't.  You risk deleting a file just as it starts to be used.
> You could possibly look into pg_control to see the current LSN and
> avoid touching any files >= that point, but of course this complicates
> the maintenance logic quite a bit.
> 
> The larger issue here is that you're confusing the function of an archive
> area with that of the active WAL directory.  The server will prune what is
> in the active WAL directory and does not want your help.  In an archive
> directory, I'd expect the files to have monotonic timestamps corresponding
> to the times you copied them over to the archive, so you could rely on
> the timestamp sequence there.

Agreed, that should work.

However, this just the beginning of the complexities you will encounter
when dealing with WAL archiving and expiration.  You should consider
using a mature third-party solution like pgBackRest or Barman.

-- 
-David
david@pgmasters.net


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (12+ messages)  latest in thread

Message-ID: <beef18bc-861a-e14e-be32-fc9592d8b708@pgmasters.net>
Permalink:  ../beef18bc-861a-e14e-be32-fc9592d8b708@pgmasters.net/
Also on:    postgresql.org/message-id/beef18bc-861a-e14e-be32-fc9592d8b708@pgmasters.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: david@pgmasters.net, achill@matrix.gatewaynet.com
  Subject: Re: Strange times in WAL files in archive directory (9.3)
  In-Reply-To: <beef18bc-861a-e14e-be32-fc9592d8b708@pgmasters.net>
  References: <58871A66.306@matrix.gatewaynet.com> <58873609.4030004@matrix.gatewaynet.com> <13126.1485264550@sss.pgh.pa.us> <beef18bc-861a-e14e-be32-fc9592d8b708@pgmasters.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox