PITR Base Backup on an idle 8.1 server

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PITR Base Backup on an idle 8.1 server
Date: 2007-05-31 02:41:35
Message-ID: Pine.GSO.4.64.0705302214430.14272@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to figure out the best way to cope with creating a PITR base
backup on a 8.1 server that is essentially idle during that time (and for
hours afterwards). Because there's no activity when the backup is going
on, I get the same segment file for FIRST WAL and LAST WAL.
Unfortunately, that segment doesn't get archived within an acceptable
period of time. The "correct" approach of having a script that waits for
the LAST WAL to appear waits for far longer than the things dependant on
the backup can afford to linger around.

Obviously this problem goes away with the archive_timeout in 8.2, but I'm
curious what clever workarounds people might be using with existing 8.1
servers in this sort of situation. Things I'm considering so far:

-Touch the expected archive file to block the archive_command, create the
file using the partial segment, finish the backup, then wipe the partial
so regular archiving will get to it eventually. I dislike programming
around the race conditions implicit here, particularly in something that's
otherwise happily implemented in a simple shell script.

-Find something harmless I can execute in a loop that will generate WAL
activity, run that until the segment gets archived. Haven't really
thought of something good to use for that purpose yet.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincenzo Romano 2007-05-31 07:01:45 Make for PgSQL?
Previous Message Gabriel Laet 2007-05-31 02:01:14 Re: Design Table & Search Question