Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ba08155

Browse files
committed
pg_upgrade: use pg_usleep(); remove Windows workaround
1 parent f9c6d72 commit ba08155

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

contrib/pg_upgrade/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static DWORD mainThreadId = 0;
102102

103103
for (iter = 0; iter < 4 && log == NULL; iter++)
104104
{
105-
sleep(1);
105+
pg_usleep(1000000); /* 1 sec */
106106
log = fopen(log_file, "a");
107107
}
108108
}

contrib/pg_upgrade/pg_upgrade.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ extern char *output_files[];
8383
#define pg_copy_file CopyFile
8484
#define pg_mv_file pgrename
8585
#define pg_link_file win32_pghardlink
86-
#define sleep(x) Sleep(x * 1000)
8786
#define PATH_SEPARATOR '\\'
8887
#define RM_CMD "DEL /q"
8988
#define RMDIR_CMD "RMDIR /s/q"

0 commit comments

Comments
 (0)