Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DEEBF6363C5 for ; Thu, 11 Feb 2010 13:35:22 -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 84166-04-4 for ; Thu, 11 Feb 2010 17:35:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mail.postgresql.org (Postfix) with SMTP id A2BAD63651A for ; Thu, 11 Feb 2010 13:29:37 -0400 (AST) Received: from source ([74.125.78.147]) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKS3Q+gKl9wJ5STjz9OFGf5lnMU25WZSUS@postini.com; Thu, 11 Feb 2010 09:29:43 PST Received: by ey-out-1920.google.com with SMTP id 4so367822eyg.42 for ; Thu, 11 Feb 2010 09:29:36 -0800 (PST) Received: by 10.213.109.68 with SMTP id i4mr131283ebp.43.1265909376249; Thu, 11 Feb 2010 09:29:36 -0800 (PST) Received: from ?192.168.1.117? ([88.195.103.165]) by mx.google.com with ESMTPS id 28sm6083349eyg.28.2010.02.11.09.29.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Feb 2010 09:29:35 -0800 (PST) Message-ID: <4B743E7D.5070603@enterprisedb.com> Date: Thu, 11 Feb 2010 19:29:33 +0200 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Aidan Van Dyk CC: Simon Riggs , Fujii Masao , PostgreSQL-development Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL References: <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> <4B740613.5090004@enterprisedb.com> <20100211140118.GB14128@oak.highrise.ca> <4B74118C.30704@enterprisedb.com> <20100211144204.GC14128@oak.highrise.ca> In-Reply-To: <20100211144204.GC14128@oak.highrise.ca> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.399 tagged_above=-10 required=5 tests=AWL=0.200, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/903 X-Sequence-Number: 157246 Aidan Van Dyk wrote: > * Heikki Linnakangas [100211 09:17]: > >> Yeah, if you're careful about that, then this change isn't required. But >> pg_standby protects against that, so I think it'd be reasonable to have >> the same level of protection built-in. It's not a lot of code. > > This 1 check isn't, but what about the rest of the things pg_standby > does. How much functionality should we bring it? Ideally, "all" of it. Well, how about we bite the bullet then and add enough bells and whistles to the backend that pg_standby really isn't needed anymore, and remove it from contrib? Looking at the options to pg_standby, we're not missing much: > Options: > -c copies file from archive (default) > -l links into archive (leaves file in archive) Obsolete (link mode not supported anymore) > -d generate lots of debugging output (testing only) We have DEBUG statements in the server... > -k NUMFILESTOKEEP if RESTARTWALFILE not used, removes files prior to limit > (0 keeps all) This is dangerous, and obsoleted by the RESTARTWALFILE option (%r). > -r MAXRETRIES max number of times to retry, with progressive wait > (default=3) Frankly this seems pretty useless, but it would be easy to implement > -s SLEEPTIME seconds to wait between file checks (min=1, max=60, > default=5) The sleep time in the backend is currently hard-coded at 5 s. Should we make it configurable? > -t TRIGGERFILE defines a trigger file to initiate failover (no default) We have this in the backend already. > -w MAXWAITTIME max seconds to wait for a file (0=no limit) (default=0) We don't have a timeout in the backend. Should we? (the timeout in pg_standby won't work, even if we add the option to use pg_standby with standby_mode='on' as Simon suggested) So the only major feature we're missing is the ability to clean up old files. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com