The docs contain the following example of an archive_command for use
with standalone hot backup:

test -f /var/lib/pgsql/backup_in_progress && cp -i %p
/var/lib/pgsql/archive/%f </dev/null

Unfortunately, as I found out when I tried it, this command returns a
non-zero (on Linux/bash) when the backup_in_progress file doesn't exist,
which means that we keep accumulating WAL files when we should be
recycling them.

ISTM it would be better to use this:

if test -f /var/lib/pgsql/backup_in_progress ; then cp -i %p
/var/lib/pgsql/archive/%f </dev/null ; fi

which only returns non-zero if the copy fails.

If there's no objection I'll patch the docs accordingly - should they be
backpatched also?

cheers

andrew

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedDec 14, '07 at 3:17p
activeDec 17, '07 at 9:02a
posts2
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

Bruce Momjian: 1 post Andrew Dunstan: 1 post

People

Translate

site design / logo © 2021 Grokbase