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 1E9F0D1B1EC for ; Wed, 21 Jul 2004 22:51:11 -0300 (ADT) 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 54491-05 for ; Thu, 22 Jul 2004 01:51:09 +0000 (GMT) Received: from mail.coretech.co.nz (coretech.co.nz [202.36.204.41]) by svr1.postgresql.org (Postfix) with ESMTP id 5B0D8D1B37B for ; Wed, 21 Jul 2004 22:51:01 -0300 (ADT) Received: (qmail 4844 invoked from network); 22 Jul 2004 01:51:04 -0000 Received: from unknown (HELO coretech.co.nz) (10.0.10.28) by 0 with SMTP; 22 Jul 2004 01:51:04 -0000 Message-ID: <40FF1D88.30404@coretech.co.nz> Date: Thu, 22 Jul 2004 13:51:04 +1200 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Simon Riggs Cc: pgsql-admin@postgresql.org Subject: Re: [HACKERS] Point in Time Recovery References: <200407132242.i6DMgg612564@candle.pha.pa.us> <1089760416.17493.3327.camel@stromboli> <40F49AE9.2060805@familyhealth.com.au> <1089789682.17493.3890.camel@stromboli> In-Reply-To: <1089789682.17493.3890.camel@stromboli> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/239 X-Sequence-Number: 14307 Here is one for the 'idiot proof' category: 1) initdb and set archive_command 2) shutdown 3) do a backup 4) startup and run some transactions 5) shutdown and remove PGDATA 6) restore backup 7) startup Obviously this does not work as the backup is performed with the database shutdown. This got me wondering for 2 reasons: 1) Some alternative database servers *require* a procedure like this to enable their version of PITR - so the potential foot-gun thing is there. 2) Is is possible to make the recovery kick in even though pg_control says the database state is shutdown? Simon Riggs wrote: > >I was hoping some fiendish plans would be presented to me... > >But please start with "this feels like typical usage" and we'll go from >there...the important thing is to try the first one. > >I've not done power off tests, yet. They need to be done just to >check...actually you don't need to do this to test PITR... > >We need to exhaustive tests of... >- power off >- scp and cross network copies >- all the permuted recovery options >- archive_mode = off (i.e. current behaviour) >- deliberately incorrectly set options (idiot-proof testing) > > > >