Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id F1218632693 for ; Thu, 11 Feb 2010 08:44:24 -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 19059-06 for ; Thu, 11 Feb 2010 12:44:07 +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 BE34B6323F3 for ; Thu, 11 Feb 2010 08:44:13 -0400 (AST) Received: from source ([74.125.78.147]) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKS3P7m5dWzy1SsjzVWktGuCJiqI31VDok@postini.com; Thu, 11 Feb 2010 04:44:13 PST Received: by ey-out-1920.google.com with SMTP id 3so303654eyh.32 for ; Thu, 11 Feb 2010 04:44:11 -0800 (PST) Received: by 10.213.109.74 with SMTP id i10mr1481058ebp.61.1265892251639; Thu, 11 Feb 2010 04:44:11 -0800 (PST) Received: from ?192.168.1.117? ([88.195.103.165]) by mx.google.com with ESMTPS id 23sm5324874eya.43.2010.02.11.04.44.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Feb 2010 04:44:11 -0800 (PST) Message-ID: <4B73FB99.4080403@enterprisedb.com> Date: Thu, 11 Feb 2010 14:44:09 +0200 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Simon Riggs 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> <1265884657.7341.1192.camel@ebony> <4B73F678.8070109@enterprisedb.com> <1265891248.7341.1346.camel@ebony> In-Reply-To: <1265891248.7341.1346.camel@ebony> 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.395 tagged_above=-10 required=5 tests=AWL=0.204, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/841 X-Sequence-Number: 157184 Simon Riggs wrote: > On Thu, 2010-02-11 at 14:22 +0200, Heikki Linnakangas wrote: >> Simon Riggs wrote: >>> On Wed, 2010-02-10 at 09:32 +0200, Heikki Linnakangas wrote: >>>> 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. >>> Are we trying to re-invent pg_standby here? >> That's not the goal, but we seem to need some of the same functionality >> in the backend now. > > I think you need to say why... See the quoted paragraph above. We should check the file size, so that we will not fail if the WAL file is just being copied into the archive directory. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com