Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 2627863344F for ; Fri, 12 Feb 2010 06:15:53 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 87100-07 for ; Fri, 12 Feb 2010 10:15:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og115.obsmtp.com (exprod7og115.obsmtp.com [64.18.2.217]) by mail.postgresql.org (Postfix) with SMTP id EF05D6324D3 for ; Fri, 12 Feb 2010 06:15:40 -0400 (AST) Received: from source ([209.85.219.217]) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKS3UqS6Zu1Jblnr/EeQkP4xQ1JKU9s8o0@postini.com; Fri, 12 Feb 2010 02:15:40 PST Received: by mail-ew0-f217.google.com with SMTP id 9so2621366ewy.15 for ; Fri, 12 Feb 2010 02:15:38 -0800 (PST) Received: by 10.213.100.230 with SMTP id z38mr249645ebn.87.1265969738450; Fri, 12 Feb 2010 02:15:38 -0800 (PST) Received: from ?192.168.1.117? ([88.195.103.165]) by mx.google.com with ESMTPS id 7sm7781945eyg.17.2010.02.12.02.15.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Feb 2010 02:15:34 -0800 (PST) Message-ID: <4B752A43.30503@enterprisedb.com> Date: Fri, 12 Feb 2010 12:15:31 +0200 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Fujii Masao CC: PostgreSQL-development Subject: Re: Streaming Replication docs References: <4B751BEA.7000202@enterprisedb.com> <3f0b79eb1002120209i3afd935exd2e875ac11df19d7@mail.gmail.com> In-Reply-To: <3f0b79eb1002120209i3afd935exd2e875ac11df19d7@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.522 tagged_above=-10 required=5 tests=AWL=-0.684, BAYES_00=-2.599, FS_REPLICA=1.041, SARE_SPEC_REPLICA=0.72 X-Spam-Level: X-Archive-Number: 201002/1001 X-Sequence-Number: 157344 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