Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5566E64FCFC for ; Thu, 7 Aug 2008 12:21:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10080-06 for ; Thu, 7 Aug 2008 12:21:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail136170.authsmtp.com (outmail136170.authsmtp.com [62.13.136.170]) by postgresql.org (Postfix) with ESMTP id 47D8264FCF6 for ; Thu, 7 Aug 2008 12:21:24 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt6.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m77FLMge033656; Thu, 7 Aug 2008 16:21:22 +0100 (BST) Received: from [192.168.0.3] (85-211-19-153.dyn.gotadsl.co.uk [85.211.19.153]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m77FLCYA036888; Thu, 7 Aug 2008 16:21:12 +0100 (BST) Subject: Re: Infrastructure changes for recovery From: Simon Riggs To: Tom Lane Cc: pgsql-hackers In-Reply-To: <29481.1218120486@sss.pgh.pa.us> References: <1218109459.4549.423.camel@ebony.2ndQuadrant> <29481.1218120486@sss.pgh.pa.us> Content-Type: text/plain Date: Thu, 07 Aug 2008 16:28:20 +0100 Message-Id: <1218122900.4549.538.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 788b4f64-6494-11dd-8155-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaAJbbExW HGQLW1xEUVt7W2J/ agkfZQBDYEtPQQRj TklMQU1QEQdtHhxP WxkZJGUBHnRGe3h4 bU4sX3hcWgp9fU4v RhhSEXAAYW5kdWEe BBRFfwJRdR5Kfh5E YlUrV3QKMjRJBC9q VzwTFhsSEA9kHWx0 RA8XJEkOW1sAAiMm SlgJHTwpEkAeDys0 NVQ8J1UbAksLIy0A X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:1186/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/297 X-Sequence-Number: 122051 On Thu, 2008-08-07 at 10:48 -0400, Tom Lane wrote: > Simon Riggs writes: > > I propose to > > * have startup process signal postmaster when it starts Redo phase (if > > it starts it) > > Doesn't seem like "starts recovery" is the point at which you can start > letting clients into the DB. What you want is to reach a point at which > you're sure that the DB is internally consistent, though perhaps not > fully synced with the master. In a PITR recovery scenario this would > correspond to reaching the minimum safe stop point. In true crash > recovery I don't think you can let people in till you're done. Ack to both, no worries: just worded it a little too loosely. For crash recovery we could let them in earlier, but I think its going to recover faster if we don't. So, yes, only during archive recovery and therefore only from min safe stopping point. That will mean bgwriter is only active during archive recovery, but that's not important, since we (almost) never perform restartpoints during crash recovery. For other background I should also mention that this architecture proposal is different from Florian's SoC proposals, which had a separate recovery process to perform the work after the min safe stopping point. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support