1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-21 12:05:57 +03:00

pg_upgrade: fix parallel/-j crash on Windows

This fixes the problem of passing the wrong function pointer when doing
parallel copy/link operations on Windows.
Backpatched to 9.3beta.
Found and patch supplied by Andrew Dunstan
This commit is contained in:
Bruce Momjian 2013-07-24 10:00:37 -04:00
parent 808d1f8122
commit 38afb907af

View File

@ -244,7 +244,7 @@ parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
strcpy(new_arg->new_pgdata, new_pgdata); strcpy(new_arg->new_pgdata, new_pgdata);
strcpy(new_arg->old_tablespace, old_tablespace); strcpy(new_arg->old_tablespace, old_tablespace);
child = (HANDLE) _beginthreadex(NULL, 0, (void *) win32_exec_prog, child = (HANDLE) _beginthreadex(NULL, 0, (void *) win32_transfer_all_new_dbs,
new_arg, 0, NULL); new_arg, 0, NULL);
if (child == 0) if (child == 0)
pg_log(PG_FATAL, "could not create worker thread: %s\n", strerror(errno)); pg_log(PG_FATAL, "could not create worker thread: %s\n", strerror(errno));