PITR WAL backups - Mailing list pgsql-admin

From Mark Reidenbach
Subject PITR WAL backups
Date
Msg-id 42012233.40700@everytruckjob.com
Whole thread Raw
Responses Re: PITR WAL backups  (Morus Walter <morus.walter@tanto.de>)
Re: PITR WAL backups  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-admin
The PITR documentation recommends that a user's archive command should
not overwrite an existing wal archive file, but it appears you need at
least the wal archive file that matches the .backup marker for the
recovery process to succeed.  This makes sense because the recovery
process needs to replay what happened during the time it took to make
the backup.  The problem I'm having is that you need to backup this wal
file before it's been archived to have a backup which is consistent, but
the documentation also states you need to make sure not to overwrite
existing files in your archive command.

Is the solution to copy this wal file to a directory other than the
archive directory and make sure it's part of the base backup.  If you
run a cron job to save the current wal file every minute or so, should
this file also be copied to a different directory than the archive
directory to prevent the check for existing files from failing?  Is this
how other people have their systems set up?

If this is correct, maybe the documentation should mention a separate
directory should be used for the wal file that matches the .backup file
and for the files copied by cron jobs so that checks for existing files
won't find the partially wal files and fail to overwrite them.  It might
also state you need to copy the wal file matching the .backup marker to
the archive directory if it wasn't archived through the system's archive
command and that the file copied by the cron job also needs to be copied
to your archive directory before running recovery.

Is any of this correct or am I messing up the procedure entirely?

Thanks,
Mark Reidenbach

pgsql-admin by date:

Previous
From: Darcy Buskermolen
Date:
Subject: Re: PostgreSQL Multiple Vulnerabilities
Next
From: Dave Vieglais
Date:
Subject: client authentication problem