Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0D09E632E20 for ; Wed, 10 Feb 2010 12:53:50 -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 93864-03 for ; Wed, 10 Feb 2010 16:53:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og104.obsmtp.com (exprod7og104.obsmtp.com [64.18.2.161]) by mail.postgresql.org (Postfix) with SMTP id 9B3D7632CC7 for ; Wed, 10 Feb 2010 12:53:38 -0400 (AST) Received: from source ([209.85.219.227]) by exprod7ob104.postini.com ([64.18.6.12]) with SMTP ID DSNKS3LkkRDCml/KiY8JApzdph6/698QzVDl@postini.com; Wed, 10 Feb 2010 08:53:38 PST Received: by mail-ew0-f227.google.com with SMTP id 27so212016ewy.38 for ; Wed, 10 Feb 2010 08:53:37 -0800 (PST) Received: by 10.213.0.199 with SMTP id 7mr1925443ebc.61.1265820817199; Wed, 10 Feb 2010 08:53:37 -0800 (PST) Received: from ?192.168.1.117? ([88.195.103.165]) by mx.google.com with ESMTPS id 28sm3263859eye.31.2010.02.10.08.53.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Feb 2010 08:53:35 -0800 (PST) Message-ID: <4B72E48E.7060606@enterprisedb.com> Date: Wed, 10 Feb 2010 18:53:34 +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: 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> <20100210134500.GM3670@oak.highrise.ca> In-Reply-To: <20100210134500.GM3670@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.393 tagged_above=-10 required=5 tests=AWL=0.206, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/755 X-Sequence-Number: 157098 Aidan Van Dyk wrote: > * Heikki Linnakangas [100210 02:33]: > >> Hmm, so after running restore_command, check the file size and if it's >> too short, treat it the same as if restore_command returned non-zero? >> And it will be retried on the next iteration. Works for me, though OTOH >> it will then fail to complain about a genuinely WAL file that's >> truncated for some reason. I guess there's no way around that, even if >> you have a script as restore_command that does the file size check, it >> will have the same problem. > > But isn't this something every current PITR archive already "works > around"... Everybody doing PITR archives already know the importance of > making the *appearance* of the WAL filename in the archive atomic. Well, pg_standby does defend against that, but you don't use pg_standby with the built-in standby mode anymore. It would be reasonable to have the same level of defenses built-in. It's essentially a one-line change, and saves a lot of trouble and risk of subtle misconfiguration for admins. > Don't docs warn about plain cp not being atomic and allowing "short" > files to appear in the archive... Hmm, I don't see anything about that at quick glance. Besides, normal PITR doesn't have a problem with that, because it will stop when it reaches the end of archived WAL anyway. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com