X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 207DF9F94EA for ; Tue, 23 May 2006 12:17:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 84664-05 for ; Tue, 23 May 2006 12:17:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sand3.gxn.net (sand3.gxn.net [195.147.249.238]) by postgresql.org (Postfix) with ESMTP id A66549F946D for ; Tue, 23 May 2006 12:17:16 -0300 (ADT) Received: from [62.232.55.118] (helo=[192.168.0.2]) by sand3.gxn.net with esmtp (Exim 4.50) id 1FiYeA-0007j3-0u; Tue, 23 May 2006 16:18:10 +0100 Subject: Re: [ADMIN] does wal archiving block the current client From: Simon Riggs To: Tom Lane Cc: Jeff Frost , pgsql-hackers@postgreSQL.org In-Reply-To: <5781.1148396964@sss.pgh.pa.us> References: <727.1148054597@sss.pgh.pa.us> <1148056053.2646.672.camel@localhost.localdomain> <1148395755.2646.825.camel@localhost.localdomain> <3835.1148396027@sss.pgh.pa.us> <1148396461.2646.833.camel@localhost.localdomain> <5781.1148396964@sss.pgh.pa.us> Content-Type: text/plain Date: Tue, 23 May 2006 16:17:12 +0100 Message-Id: <1148397432.2646.837.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 (2.6.1-1.fc5.2) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/924 X-Sequence-Number: 83789 On Tue, 2006-05-23 at 11:09 -0400, Tom Lane wrote: > Simon Riggs writes: > > On Tue, 2006-05-23 at 10:53 -0400, Tom Lane wrote: > >> I think we just need a PostmasterIsAlive check in the per-file loop. > > > ...which would mean the archiver would not outlive postmaster in the > > event it crashes...which is exactly the time you want it to keep going. > > Postmaster crashes are not a problem in practice; we've been careful to > keep the postmaster doing so little that there's no material risk of it > failing. If the postmaster dies it's almost certainly because someone > killed it, and you really want the child processes to close up shop too. > > (If we did want the archiver to keep running, it shouldn't have any > PostmasterIsAlive check at all; I can't see a reason why completing > one iteration of the outer loop is a better time to stop than any > other time.) This does at least solve the fast restart problem, so look on -patches in a few minutes. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com