Re: Streaming Replication docs - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Streaming Replication docs
Date
Msg-id 4B752A43.30503@enterprisedb.com
Whole thread Raw
In response to Re: Streaming Replication docs  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Streaming Replication docs
List pgsql-hackers
Fujii Masao wrote:
> We might need to add the following code of pg_standby into the core,
> to prefer it for many cases.
> 
>> #ifdef WIN32
>>
>>             /*
>>              * Windows 'cp' sets the final file size before the copy is
>>              * complete, and not yet ready to be opened by pg_standby. So we
>>              * wait for sleeptime secs before attempting to restore. If that
>>              * is not enough, we will rely on the retry/holdoff mechanism.
>>              * GNUWin32's cp does not have this problem.
>>              */
>>             pg_usleep(sleeptime * 1000000L);
>> #endif

That's actually a bit questionable, always has been even in pg_standby.
It adds a constant 1 s delay to the recovery each WAL file, which
effectively rate-limits the WAL recovery to 16MB per second. I think we
should rather add a warning to the docs, suggesting the copy-then-rename
method on Windows.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: TCP keepalive support for libpq
Next
From: Fujii Masao
Date:
Subject: Re: Streaming Replication docs