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

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 (view raw or flat)
Thread:
Lists: pgsql-docspgsql-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

pgsql-docs by date

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

pgsql-hackers by date

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

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