Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 28E6164FF82; Wed, 23 Jul 2008 19:59:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80522-01; Wed, 23 Jul 2008 19:59:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by postgresql.org (Postfix) with ESMTP id 7D78B64FD1A; Wed, 23 Jul 2008 19:59:34 -0300 (ADT) X-Trace: 61209549/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-NILDRAM-ACCEPTED/f2s-temporary-group/85.211.229.155 X-SBRS: None X-RemoteIP: 85.211.229.155 X-IP-MAIL-FROM: simon@2ndquadrant.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsAANBUh0hV0+Wb/2dsb2JhbAAIszY X-IronPort-AV: E=Sophos;i="4.31,240,1215385200"; d="scan'208";a="61209549" X-IP-Direction: IN Received: from 85-211-229-155.dyn.gotadsl.co.uk (HELO [192.168.0.3]) ([85.211.229.155]) by smtp.f2s.tiscali.co.uk with ESMTP; 23 Jul 2008 23:59:31 +0100 Subject: Re: [PATCHES] odd output in restore mode From: Simon Riggs To: Heikki Linnakangas Cc: Martin Zaun , Bruce Momjian , Andrew Dunstan , Dave Page , List pgsql-patches , PostgreSQL-development In-Reply-To: <48877AC0.7070603@enterprisedb.com> References: <200807011520.m61FKhZ20311@momjian.us> <48867904.9090001@sun.com> <1216810783.3894.602.camel@ebony.2ndQuadrant> <48877AC0.7070603@enterprisedb.com> Content-Type: text/plain Date: Thu, 24 Jul 2008 00:05:56 +0100 Message-Id: <1216854356.3894.699.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/1102 X-Sequence-Number: 121362 On Wed, 2008-07-23 at 21:38 +0300, Heikki Linnakangas wrote: > Simon Riggs wrote: > > On Tue, 2008-07-22 at 17:19 -0700, Martin Zaun wrote: > >> 8. Unresolved question of implementing now/later a "cp" replacement > > > > The patch implements what's been agreed. > > > > I'm not rewriting "cp", for reasons already discussed. > > > > Not a comment to you Martin, but it's fairly clear that I'm not > > maintaining this correctly for Windows. I've never claimed to have > > tested this on Windows, and only included Windows related items as > > requested by others. I need to make it clear that I'm not going to > > maintain it at all, for Windows. If others wish to report Windows issues > > then they can suggest appropriate fixes and test them also. > > Hmm. I just realized that replacing the "cp" command within pg_standby > won't help at all. The problem is with the command that copies the files > *to* the archivelocation that pg_standby polls, not with the copy > pg_standby does from archivelocation to pg_xlog. And we don't have much > control over that. > > We really need a more reliable way of detecting that a file has been > fully copied. One simple improvement would be to check the xlp_magic > field of the last page, though it still wouldn't be bullet-proof. > > Do the commands that preallocate the space keep the file exclusively > locked during the copy? If they do, shouldn't we get an error in trying > to run the restore copy command, and retry after the 1s sleep in > RestoreWALFileForRecovery? Though if the archive location is a samba > mount or something, I guess we can't rely on Windows-style exclusive > locking. With respect, I need to refer you back to the my last paragraph above. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support