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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

PITR Base Backup on an idle 8.1 server



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group