]> granicus.if.org Git - postgresql/commitdiff
pg_upgrade: use pg_usleep(); remove Windows workaround
authorBruce Momjian <bruce@momjian.us>
Wed, 26 Mar 2014 14:22:16 +0000 (10:22 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 26 Mar 2014 14:22:39 +0000 (10:22 -0400)
contrib/pg_upgrade/exec.c
contrib/pg_upgrade/pg_upgrade.h

index ddf16d2497e31d83cf04969fb9a41f1bd74a849c..c991a8d033f863b2bbf45018692524f478b37f63 100644 (file)
@@ -102,7 +102,7 @@ static DWORD       mainThreadId = 0;
 
                for (iter = 0; iter < 4 && log == NULL; iter++)
                {
-                       sleep(1);
+                       pg_usleep(1000000);             /* 1 sec */
                        log = fopen(log_file, "a");
                }
        }
index 389ec936d04858d1dfdb62be9e741e0d3bffcdbf..14039b4d3dea11f1797fca65c87ce7222e0ad2c4 100644 (file)
@@ -83,7 +83,6 @@ extern char *output_files[];
 #define pg_copy_file           CopyFile
 #define pg_mv_file                     pgrename
 #define pg_link_file           win32_pghardlink
-#define sleep(x)                       Sleep(x * 1000)
 #define PATH_SEPARATOR         '\\'
 #define RM_CMD                         "DEL /q"
 #define RMDIR_CMD                      "RMDIR /s/q"