I have added the attached patch to pg_upgrade to print a clear error
message if you don't have read/write/execute permission in the current
directory, which is needed for pg_upgrade to read/write temporary files.
This is based on a bug report I received from EnterpriseDB usage
testing.
--
Bruce Momjian <bruce@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 71e8439..a66aeb0
*** a/contrib/pg_upgrade/exec.c
--- b/contrib/pg_upgrade/exec.c
*************** is_server_running(const char *datadir)
*** 93,98 ****
--- 93,103 ----
void
verify_directories(void)
{
+
+ if (access(".", R_OK | W_OK | X_OK) != 0)
+ pg_log(PG_FATAL,
+ "You must have full access permissions in the current directory.\n");
+
prep_status("Checking old data directory (%s)", old_cluster.pgdata);
check_data_dir(old_cluster.pgdata);
check_ok();