From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Jeff L'Huillier <Jeff.LHuillier@ONSTAR.com>
To: pgsql-admin@postgresql.org
Subject: Re: 9.0.4/7 WAL Archiving: archive_command add date-time to cp of filename
Date: Wed, 11 Apr 2012 09:09:17 -0500
Message-ID: <4F854A3D0200002500046DC2@gw.wicourts.gov> (raw)
In-Reply-To: <7CF5C5C9FE3CE140AD240A391A7681FBF5CC0F@USRN4EX0ONS06.onstar.ad.gm.com>
References: <7CF5C5C9FE3CE140AD240A391A7681FBF5CC0F@USRN4EX0ONS06.onstar.ad.gm.com>
"L'Huillier, Jeff" <Jeff.LHuillier@ONSTAR.com> wrote:
> When enabling WAL archiving and setting up the archive_command, is
> it possible to add the date & time as an extension to the %f
> copied to the archive directory in order to avoid overwriting a
> file of the same name?
The recommended behavior is to exit the recovery command (or the
script run as the command) with an exit code of 255 when the target
file already exists. This should never happen unless you
accidentally point two different database clusters to the same
target directory.
> In adding a date-time stamp to the archived file name, would this
> adversely affect the restore_command and render the %f file coming
> back unusable?
Well, you could use a wildcard in the restore command to find a
matching file, but if there is more than one because of the
timestamps added to the filename, which one do you pick?
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, Jeff.LHuillier@ONSTAR.com
Subject: Re: 9.0.4/7 WAL Archiving: archive_command add date-time to cp of filename
In-Reply-To: <4F854A3D0200002500046DC2@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox