pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-admin@postgresql.org
Subject: Re: Strange times in WAL files in archive directory (9.3)
Date: Tue, 24 Jan 2017 16:47:27 +0200
Message-ID: <588768FF.20906@matrix.gatewaynet.com> (raw)
In-Reply-To: <14804.1485267261@sss.pgh.pa.us>
References: <58871A66.306@matrix.gatewaynet.com>
	<58873609.4030004@matrix.gatewaynet.com>
	<13126.1485264550@sss.pgh.pa.us>
	<588759C8.3090209@matrix.gatewaynet.com>
	<14804.1485267261@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On 24/01/2017 16:14, Tom Lane wrote:
> Achilleas Mantzios <achill@matrix.gatewaynet.com> writes:
>> On 24/01/2017 15:29, Tom Lane wrote:
>>> 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.
>> I would be silly to mess around with pg_xlog. I was talking about the
>> archive directory. *There* is where I noticed the inconsistencies.
> If you copied the files to the archive directory when the server told you
> they were ready, it should be impossible for them to have non-sequential
> timestamps.  I'm wondering if you tried to short-circuit that, perhaps
> by hard-linking them instead of copying.  That won't work at all, since
> the server will reuse (overwrite) the files once it thinks you've
> copied them.
I provided the archive_command in the 1st post. The copy is against another host (called sma in the command) :
archive_command = '/usr/bin/scp %p sma:/smadb/pgsql/pitr/%f'
I didn't do any scp by hand. My suspicion is that PostreSQL (before recycling them) just flushed via the archive command those files which were created before PITR was setup, i.e. before the server 
was restarted to begin WAL archiving. The timestamps observed on the sequence of files make me believe so.
First thing this morning, by seeing that, made me skeptical of whether the obvious assumption on the monotonicity between filenames/tiemstamps is valid. However for the last 7 hours (after the last 
file with the *oldish* filenames was written) I have not witnessed anything weird.
>
> 			regards, tom lane
>
>


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

view thread (12+ messages)  latest in thread

Message-ID: <588768FF.20906@matrix.gatewaynet.com>
Permalink:  ../588768FF.20906@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/588768FF.20906@matrix.gatewaynet.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: Strange times in WAL files in archive directory (9.3)
  In-Reply-To: <588768FF.20906@matrix.gatewaynet.com>

* 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