1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

pg_upgrade: fix CopyFile() on Windows to fail on file existence

Also fix getErrorText() to return the right error string on failure.
This behavior now matches that of other operating systems.

Report by Noah Misch

Backpatch through 9.1
This commit is contained in:
Bruce Momjian
2015-11-24 17:18:28 -05:00
parent 7acad95463
commit f91c4e326a
13 changed files with 35 additions and 38 deletions

View File

@ -119,7 +119,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if ((output = popen(cmd, "r")) == NULL)
pg_fatal("Could not get control data using %s: %s\n",
cmd, getErrorText(errno));
cmd, getErrorText());
/* Only pre-8.4 has these so if they are not set below we will check later */
cluster->controldata.lc_collate = NULL;