Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] odd output in restore mode

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Martin Zaun" <Martin(dot)Zaun(at)Sun(dot)COM>,"Bruce Momjian" <bruce(at)momjian(dot)us>,"Andrew Dunstan" <andrew(at)dunslane(dot)net>,"Dave Page" <dpage(at)pgadmin(dot)org>,"List pgsql-patches" <pgsql-patches(at)postgresql(dot)org>,"PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] odd output in restore mode
Date: 2008-07-23 18:38:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
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 

   Heikki Linnakangas

In response to


pgsql-hackers by date

Next:From: Zdenek KotalaDate: 2008-07-23 18:55:57
Subject: Re: Review: DTrace probes (merged version)
Previous:From: Marko KreenDate: 2008-07-23 17:54:06
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?

pgsql-patches by date

Next:From: Kevin GrittnerDate: 2008-07-23 19:11:06
Subject: Re: [PATCHES] odd output in restore mode
Previous:From: Simon RiggsDate: 2008-07-23 17:09:47
Subject: Re: pg_dump additional options for performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group