X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 56E77D9D38 for ; Sat, 1 Oct 2005 05:21:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82300-06 for ; Sat, 1 Oct 2005 08:21:05 +0000 (GMT) Received: from smtp.nildram.co.uk (smtp.nildram.co.uk [195.112.4.54]) by svr1.postgresql.org (Postfix) with ESMTP id 3E44ED9D40 for ; Sat, 1 Oct 2005 05:21:05 -0300 (ADT) Received: from 192.168.0.3 (unknown [84.12.173.204]) by smtp.nildram.co.uk (Postfix) with ESMTP id CDE57252FF7; Sat, 1 Oct 2005 09:21:05 +0100 (BST) Subject: Re: archive_command From: Simon Riggs To: Jeff Frost Cc: Kris Kiger , pgsql-admin@postgresql.org In-Reply-To: References: <20031115132118.V74587@holywar.net> <433AC059.1050300@musicrebellion.com> <433ACE02.3040208@musicrebellion.com> <1128071627.19345.256.camel@localhost.localdomain> Content-Type: text/plain Organization: 2nd Quadrant Date: Fri, 30 Sep 2005 21:59:28 +0100 Message-Id: <1128113968.4045.32.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.261 required=5 tests=[DATE_IN_PAST_06_12=0.211, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/2 X-Sequence-Number: 19074 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