Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AA707633222 for ; Thu, 11 Feb 2010 10:55:30 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 47318-06 for ; Thu, 11 Feb 2010 14:55:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mail.postgresql.org (Postfix) with ESMTP id 5A161632A72 for ; Thu, 11 Feb 2010 10:55:19 -0400 (AST) Received: from [192.168.1.3] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0Lxdhj-1NnE2k0unz-0174Vn; Thu, 11 Feb 2010 15:55:15 +0100 Message-ID: <4B741A4F.4000807@2ndquadrant.com> Date: Thu, 11 Feb 2010 09:55:11 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Heikki Linnakangas CC: Simon Riggs , Dimitri Fontaine , Fujii Masao , PostgreSQL-development Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL References: <20100127152751.3B2047541B9@cvs.postgresql.org> <3f0b79eb1002092105r21e009d3v468496058ba04392@mail.gmail.com> <4B726120.80007@enterprisedb.com> <1265884657.7341.1192.camel@ebony> <4B73F678.8070109@enterprisedb.com> <1265891248.7341.1346.camel@ebony> <4B73FB99.4080403@enterprisedb.com> <1265893599.7341.1454.camel@ebony> <877hqjc2kk.fsf@hi-media-techno.com> <1265896250.7341.1627.camel@ebony> <4B740C6C.3010607@enterprisedb.com> <1265897834.7341.1714.camel@ebony> <4B7412BE.5030605@enterprisedb.com> In-Reply-To: <4B7412BE.5030605@enterprisedb.com> Content-Type: multipart/alternative; boundary="------------060404080702090800060009" X-Provags-ID: V01U2FsdGVkX18LUD/XTlRyDHNB4VNX1NXZGQJGrngo4IJMdSg gn6ZVikZXHvmwhtHU/se+r055szVE43Da9HOqmhn2bwerffekW 6BxS0T44S88wnh70UhWGrGa0gkUqRia X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.422 tagged_above=-10 required=5 tests=AWL=0.176, BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201002/868 X-Sequence-Number: 157211 This is a multi-part message in MIME format. --------------060404080702090800060009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Heikki Linnakangas wrote: > Simon Riggs wrote: > >> Might it not be simpler to add a parameter onto pg_standby? >> We send %s to tell pg_standby the standby_mode of the server which is >> calling it so it can decide how to act in each case. >> > > That would work too, but it doesn't seem any simpler to me. On the contrary. > I don't know that the ideas are mutually exclusive. Should the server internals do a basic check that the files they're about to process seem sane before processing them? Yes. Should we provide a full-featured program that knows how far back it can delete archives rather than expecting people to write their own? Yes. And a modified pg_standby seems the easiest way to do that, since it already knows how to do the computations, among other benefits. I already have a work in progress patch to pg_standby I'm racing to finish here that cleans up some of the UI warts in the program, including the scary sounding and avoidable warnings Selena submitted a patch to improve. I think I'm going to add this feature to it, too, whether or not it's deemed necessary. I'm really tired of example setups provided that say "just write a simple script using cp like " and then supporting those non-production quality messes in the field. My scripts for this sort of thing have more error checking in them than functional code. And pg_standby already has a healthy sense of paranoia built into it. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us --------------060404080702090800060009 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Heikki Linnakangas wrote:
Simon Riggs wrote:
  
Might it not be simpler to add a parameter onto pg_standby?
We send %s to tell pg_standby the standby_mode of the server which is
calling it so it can decide how to act in each case.
    

That would work too, but it doesn't seem any simpler to me. On the contrary.
  

I don't know that the ideas are mutually exclusive.  Should the server internals do a basic check that the files they're about to process seem sane before processing them?  Yes.  Should we provide a full-featured program that knows how far back it can delete archives rather than expecting people to write their own?  Yes.  And a modified pg_standby seems the easiest way to do that, since it already knows how to do the computations, among other benefits.

I already have a work in progress patch to pg_standby I'm racing to finish here that cleans up some of the UI warts in the program, including the scary sounding and avoidable warnings Selena submitted a patch to improve.  I think I'm going to add this feature to it, too, whether or not it's deemed necessary.  I'm really tired of example setups provided that say "just write a simple script using cp like <trivial example>" and then supporting those non-production quality messes in the field.  My scripts for this sort of thing have more error checking in them than functional code.  And pg_standby already has a healthy sense of paranoia built into it.

-- 
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us
--------------060404080702090800060009--