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 [EMAIL PROTECTED] http://www.gregsmith.com Baltimore, MD

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to