From: Simon Riggs <simon@2ndquadrant.com>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: Kris Kiger <kris@musicrebellion.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: archive_command
Date: Fri, 30 Sep 2005 21:59:28 +0100
Message-ID: <1128113968.4045.32.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.63.0509300926340.1280@discord.dyndns.org>
References: <20031115132118.V74587@holywar.net>
<433AC059.1050300@musicrebellion.com>
<Pine.LNX.4.63.0509280925070.28080@discord.dyndns.org>
<433ACE02.3040208@musicrebellion.com>
<1128071627.19345.256.camel@localhost.localdomain>
<Pine.LNX.4.63.0509300926340.1280@discord.dyndns.org>
On Fri, 2005-09-30 at 09:29 -0700, Jeff Frost wrote:
> On Fri, 30 Sep 2005, Simon Riggs wrote:
>
> > You don't say why you need to know?
>
> Not sure why Kris needs to know, but I need to know for PITR and keeping the
> latest WAL file saved by a script which runs every few minutes as my client
> does not turn over WAL files very often (about 4/day).
>
> > If you really care, you can look at the status files in the
> > archive_status directory underneath pg_xlog. This is where the archiver
> > checks to see for notifications of filled WAL files, then clears the
> > notification afterwards. Only filled WAL filenames are shown.
>
> I see lots of items like this:
>
> 0000000100000013000000A4.00AEE2F0.backup.done
> 0000000100000013000000DE.00B8A498.backup.done
>
> I presume these correlate with the files in the pg_xlog directory that look
> like so:
>
> 0000000100000013000000A4.00AEE2F0.backup
> 0000000100000013000000DE.00B8A498.backup
>
> 0000000100000013000000DF
> 0000000100000013000000E0
> 0000000100000013000000E1
> 0000000100000013000000E2
> 0000000100000013000000E3
> 0000000100000013000000E4
> 0000000100000013000000E5
> 0000000100000013000000E6
>
> Given that list, does that mean that 0000000100000013000000DF is the in use
> WAL file?
>
If I follow your example, yes. But that assumes there is only one
timeline's WAL files in your pg_xlog. It could get more complex in that
situation because you could be in any of the timelines.
But, if you know which timeline you're in, then yes, the file after the
latest file in archive_status is the current WAl file.
It might be interesting to submit your script to put into contrib?
Best Regards, Simon Riggs
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: simon@2ndquadrant.com, jeff@frostconsultingllc.com, kris@musicrebellion.com
Subject: Re: archive_command
In-Reply-To: <1128113968.4045.32.camel@localhost.localdomain>
References: <20031115132118.V74587@holywar.net> <433AC059.1050300@musicrebellion.com> <Pine.LNX.4.63.0509280925070.28080@discord.dyndns.org> <433ACE02.3040208@musicrebellion.com> <1128071627.19345.256.camel@localhost.localdomain> <Pine.LNX.4.63.0509300926340.1280@discord.dyndns.org> <1128113968.4045.32.camel@localhost.localdomain>
* 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