Based on EnterpriseDB testing, I have applied the attached patch to fix a pg_upgrade bug on Win32 on 9.1 and 9.2. The problem is that on Win32 you can't stat() a directory with a trailing slash --- this is already mentioned in our src/port/path.c. The patch removes a lone trailing slash.
-- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
diff --git a/contrib/pg_upgrade/exec.c b/contrib/pg_upgrade/exec.c new file mode 100644 index ef21899..b632584 *** a/contrib/pg_upgrade/exec.c --- b/contrib/pg_upgrade/exec.c *************** check_data_dir(const char *pg_data) *** 168,174 **** { struct stat statBuf; ! snprintf(subDirName, sizeof(subDirName), "%s/%s", pg_data, requiredSubdirs[subdirnum]); if (stat(subDirName, &statBuf) != 0) --- 168,176 ---- { struct stat statBuf; ! snprintf(subDirName, sizeof(subDirName), "%s%s%s", pg_data, ! /* Win32 can't stat() a directory with a trailing slash. */ ! *requiredSubdirs[subdirnum] ? "/" : "", requiredSubdirs[subdirnum]); if (stat(subDirName, &statBuf) != 0)
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers