Re: Streaming Replication docs

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming Replication docs
Date: 2010-02-12 10:15:31
Message-ID: 4B752A43.30503@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs 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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Fujii Masao 2010-02-12 10:23:59 Re: Streaming Replication docs
Previous Message Fujii Masao 2010-02-12 10:09:40 Re: Streaming Replication docs

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-02-12 10:15:32 Re: TCP keepalive support for libpq
Previous Message Dimitri Fontaine 2010-02-12 10:09:44 Re: Parameter name standby_mode