From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | standalone hot backup docs |
Date: | 2007-12-14 15:17:47 |
Message-ID: | 47629E9B.6000300@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2007-12-14 15:30:10 | Re: buildenv.pl/buildenv.bat |
Previous Message | Bruce Momjian | 2007-12-14 15:07:56 | Re: [HACKERS] Is postgres.gif missing in cvs? |