X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A7CEE8B9E31 for ; Wed, 2 Feb 2005 18:54:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34646-02 for ; Wed, 2 Feb 2005 18:53:59 +0000 (GMT) Received: from mail.everytruckjob.com (mail.everytruckjob.com [198.87.235.158]) by svr1.postgresql.org (Postfix) with ESMTP id B98468B9CFD for ; Wed, 2 Feb 2005 18:53:56 +0000 (GMT) Received: from [192.168.13.10] (nsc69.38.0-105.newsouth.net [69.38.0.105]) (authenticated bits=0) by mail.everytruckjob.com (8.13.2/8.13.2) with ESMTP id j12IrpPW027147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 2 Feb 2005 12:53:54 -0600 Message-ID: <42012233.40700@everytruckjob.com> Date: Wed, 02 Feb 2005 12:55:47 -0600 From: Mark Reidenbach User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050104 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: PITR WAL backups Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.49 on 198.87.235.158 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/16 X-Sequence-Number: 16184 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