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

Re: Kludge in pg_standby.c

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Kludge in pg_standby.c
Date: 2008-04-10 17:48:09
Message-ID: 20080410174809.GA15380@alvh.no-ip.org (view raw or flat)
Thread:
Lists: 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.

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-04-10 17:48:14
Subject: Re: Index AM change proposals, redux
Previous:From: Fabiana PrabhakarDate: 2008-04-10 17:47:38
Subject:

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