Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E2810634A92 for ; Thu, 11 Feb 2010 10:18:26 -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 39874-04-5 for ; Thu, 11 Feb 2010 14:18:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og105.obsmtp.com (exprod7og105.obsmtp.com [64.18.2.163]) by mail.postgresql.org (Postfix) with SMTP id 2F215634249 for ; Thu, 11 Feb 2010 10:17:52 -0400 (AST) Received: from source ([209.85.219.219]) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKS3QRjyIiSRn6Tp2IVeuJYW4YY2tup/cf@postini.com; Thu, 11 Feb 2010 06:17:57 PST Received: by mail-ew0-f219.google.com with SMTP id 19so1369044ewy.1 for ; Thu, 11 Feb 2010 06:17:51 -0800 (PST) Received: by 10.213.106.199 with SMTP id y7mr1550077ebo.55.1265897870926; Thu, 11 Feb 2010 06:17:50 -0800 (PST) Received: from ?192.168.1.117? ([88.195.103.165]) by mx.google.com with ESMTPS id 7sm5602718eyg.17.2010.02.11.06.17.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Feb 2010 06:17:50 -0800 (PST) Message-ID: <4B74118C.30704@enterprisedb.com> Date: Thu, 11 Feb 2010 16:17:48 +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: <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> <4B740613.5090004@enterprisedb.com> <20100211140118.GB14128@oak.highrise.ca> In-Reply-To: <20100211140118.GB14128@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.397 tagged_above=-10 required=5 tests=AWL=0.202, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/860 X-Sequence-Number: 157203 Aidan Van Dyk wrote: > But colour me confused, I'm still not understanding why this is any > different that with normal PITR recovery. > > So even with a plain "cp" in your recovery command instead of a > sleep+copy (a la pg_standby, or PITR tools, or all the home-grown > solutions out thery), I'm not seeing how it's going to get "half files". If the file is just being copied to the archive when restore_command ('cp', say) is launched, it will copy a half file. That's not a problem for PITR, because PITR will end at the end of valid WAL anyway, but returning a half WAL file in standby mode is a problem. > It's well know in PostgreSQL wal archivne - you don't just "shove" files > into the archive, you make sure they appear there with the right name > atomically. And if the master is only running the archive command on > whole WAL files, I just don't understand this whole short wal problem. 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. We could well just document that you should do that, ie. make sure the file appears in the archive atomically with the right size. > And don't try and tell me your just "poaching" files from a running > cluster's pg_xlog directory, because I'm going to cry... No :-). -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com