Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6E71764FD15; Thu, 18 Sep 2008 10:06:58 -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 91071-05; Thu, 18 Sep 2008 10:06:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 573FF64FD12; Thu, 18 Sep 2008 10:06:52 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m8ID6aOY016993; Thu, 18 Sep 2008 09:06:36 -0400 (EDT) To: Simon Riggs cc: List pgsql-patches , pgsql-hackers Subject: Re: [PATCHES] Infrastructure changes for recovery In-reply-to: <1221725145.3913.2315.camel@ebony.2ndQuadrant> References: <1218109459.4549.423.camel@ebony.2ndQuadrant> <1220213074.4371.173.camel@ebony.2ndQuadrant> <1905.1220895241@sss.pgh.pa.us> <1221080797.3913.768.camel@ebony.2ndQuadrant> <15776.1221594318@sss.pgh.pa.us> <1221725145.3913.2315.camel@ebony.2ndQuadrant> Comments: In-reply-to Simon Riggs message dated "Thu, 18 Sep 2008 09:05:45 +0100" Date: Thu, 18 Sep 2008 09:06:36 -0400 Message-ID: <16992.1221743196@sss.pgh.pa.us> From: Tom Lane 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: 200809/1164 X-Sequence-Number: 124293 Simon Riggs writes: > Having some trouble trying to get a clean state change from recovery to > normal mode. > Startup needs to be able to write WAL at the end of recovery so it can > write a ShutdownCheckpoint, yet must not be allowed to write WAL before > that. Other services are still not fully up yet. So every other process > apart from Startup musn't write WAL until Startup has fully completed > its actions, which is sometime later. > ... > We *might* solve this by making the final checkpoint that Startup writes > into an online checkpoint. Do we really need a checkpoint there at all? I can't recall right now if there was a good reason why Vadim made it do that. I have a feeling that it might have had to do with an assumption that the recovery environment was completely distinct from live environment; which is a statement that's certainly not going to be true in a query-answering slave. regards, tom lane