Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2675164FF96 for ; Thu, 7 Aug 2008 12:58:23 -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 44125-08 for ; Thu, 7 Aug 2008 12:58:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail129152.authsmtp.com (outmail129152.authsmtp.com [62.13.129.152]) by postgresql.org (Postfix) with ESMTP id E1E6964FCF6 for ; Thu, 7 Aug 2008 12:58:19 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt5.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m77FwG1H021145; Thu, 7 Aug 2008 16:58:16 +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 m77Fw6x8059725; Thu, 7 Aug 2008 16:58:07 +0100 (BST) Subject: Re: Infrastructure changes for recovery From: Simon Riggs To: Alvaro Herrera Cc: pgsql-hackers In-Reply-To: <20080807145610.GD4171@alvh.no-ip.org> References: <1218109459.4549.423.camel@ebony.2ndQuadrant> <20080807145610.GD4171@alvh.no-ip.org> Content-Type: text/plain Date: Thu, 07 Aug 2008 17:05:14 +0100 Message-Id: <1218125114.4549.562.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: a05827e9-6499-11dd-8155-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaAJbbExW HGQLW1xEUVt7XGt/ aw0fZQBDYEtPQQRj TklMQU1QEQdtHhxP WxkZJF50Pw1GfXd3 Z0MsX3ZcWwordUN1 QEkBHHAAYW5pdWEe 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/305 X-Sequence-Number: 122059 On Thu, 2008-08-07 at 10:56 -0400, Alvaro Herrera wrote: > Simon Riggs wrote: > > ii) have postmaster allow connections while Redo is taking place, as > one > > part of allowing query access to standby database > > is interesting and I'm sure it would be very welcome. Of course, it > is first necessary to be able to run transactions in true "read only" > mode, which perhaps is nowadays not so difficult given the work with > VXids. Maybe I am assuming that part is easier than I thought. Florian's contribution with the VXid work should not be understated. I was going to spread the setting of the global variable InRedo to all backends, so they would be able to answer the question IsInRedo(). Anybody attempting to assign a new TransactionId would check this and then exit with an ERROR. There would also be a check in XLogInsert(), in case the first case doesn't catch everything or everyone. Transactions would also run as read-only transactions to keep the front door locked. Anything else you think needs bolting down? -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support