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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to