Skip to content

Commit 1b92aeb

Browse files
committed
Improve comment about why sleep is used by pg_standby to handle 'copy'
file size problem.
1 parent 30c6202 commit 1b92aeb

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

contrib/pg_standby/pg_standby.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.15 2008/12/15 21:39:25 momjian Exp $
2+
* $PostgreSQL: pgsql/contrib/pg_standby/pg_standby.c,v 1.16 2008/12/15 22:13:02 momjian Exp $
33
*
44
*
55
* pg_standby.c
@@ -179,12 +179,11 @@ CustomizableNextWALFileReady()
179179
#ifdef WIN32
180180

181181
/*
182-
* Windows reports that the file has the right number of bytes
183-
* even though the file is still being copied and cannot be opened
184-
* by pg_standby yet. So we wait for sleeptime secs before
185-
* attempting to restore. If that is not enough, we will rely on
186-
* the retry/holdoff mechanism. GNUWin32's cp does not have
187-
* this problem.
182+
* Windows 'cp' sets the final file size before the copy is
183+
* complete, and not yet ready to be opened by pg_standby.
184+
* So we wait for sleeptime secs before attempting to restore.
185+
* If that is not enough, we will rely on the retry/holdoff
186+
* mechanism. GNUWin32's cp does not have this problem.
188187
*/
189188
pg_usleep(sleeptime * 1000000L);
190189
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy