Skip site navigation (1) Skip section navigation (2)

Re: archive_command

From: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
To: Kris Kiger <kris(at)musicrebellion(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: archive_command
Date: 2005-09-28 17:15:20
Message-ID: Pine.LNX.4.63.0509281014070.28080@discord.dyndns.org (view raw or flat)
Thread:
Lists: pgsql-admin
On Wed, 28 Sep 2005, Kris Kiger wrote:

> that all relevant wal logs have been archived, save the current one. 
> My question then is, how do we tell which wal log is X (the one currently 
> being written to)?

I do something like this in my scripting:

ls -rt /pg_xlog/ | grep -v "backup\|archive" | tail -1

(My pg_xlog is on a different disk set from the PGDATA dir.)

It appears to work fine for me.  Don't forget to make a base backup before you 
begin the WAL archiving, or you won't be able to restore anything.

-- 
Jeff Frost, Owner 	<jeff(at)frostconsultingllc(dot)com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954

In response to

pgsql-admin by date

Next:From: Jeffrey TennyDate: 2005-09-28 18:51:34
Subject: Postgresql 8.0.3, symbolic link to /var/lib/pgsql/data/base
Previous:From: Kris KigerDate: 2005-09-28 17:08:18
Subject: Re: archive_command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group