Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7ADDF2E0264 for ; Fri, 11 Jan 2008 16:34:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81361-02 for ; Fri, 11 Jan 2008 16:34:01 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D0B3B2E01B5 for ; Fri, 11 Jan 2008 16:34:01 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m0BKXpdg024389; Fri, 11 Jan 2008 15:33:51 -0500 (EST) To: d.wall@computer.org cc: pgsql-admin@postgresql.org Subject: Re: WAL recovery, stop and resume recovery? In-reply-to: <4787C7A7.3000503@computer.org> References: <4787C7A7.3000503@computer.org> Comments: In-reply-to David Wall message dated "Fri, 11 Jan 2008 11:46:47 -0800" Date: Fri, 11 Jan 2008 15:33:51 -0500 Message-ID: <24388.1200083631@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/125 X-Sequence-Number: 27899 David Wall writes: > Is it allowable to have a backup database in recovery mode, then stop > recovery (in this case, by putting the trigger file in place to stop > pg_standby), check out that the backup db appears up to date, stop the > now active backup db, and then restart it in recover mode again to have > it resume its backup role? No. Once you've done any transactions in the backup DB, its transaction history has diverged from the master and you can't resume tracking the master. It shouldn't even let you try --- what shenanigans did you pull to force it back into recovery mode? There's some work being done on allowing read-only queries against an in-recovery database, which I think would satisfy your desire to see if the backup were sane or not. But I wouldn't bet money on that getting into the system anytime soon. It's definitely not something you can cobble up from spare parts. regards, tom lane