Re: Kludge in pg_standby.c - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Kludge in pg_standby.c
Date
Msg-id 20080410174809.GA15380@alvh.no-ip.org
Whole thread Raw
In response to Re: Kludge in pg_standby.c  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Kludge in pg_standby.c  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
> Gregory Stark wrote:
> > 
> > There's a suspicious ifdef in pg_standby for WIN32 which smells like a kludge
> > added to work around a Windows problem which makes it work but at great
> > expense:
> > 
> > #ifdef WIN32
> >                 /*
> >                  * Windows reports that the file has the right number of bytes
> >                  * even though the file is still being copied and cannot be
> >                  * opened by pg_standby yet. So we wait for sleeptime secs
> >                  * before attempting to restore. If that is not enough, we
> >                  * will rely on the retry/holdoff mechanism.
> >                  */
> >                 pg_usleep(sleeptime * 1000000L);
> > #endif

FWIW, it seems that this may be fixed with Magnus' patch to change
stat() on Win32.  Is there anyone with a working warm standby PITR setup
on Win32 that could test it?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Index AM change proposals, redux
Next
From: Teodor Sigaev
Date:
Subject: Re: Index AM change proposals, redux