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

Check that the pg_upgrade user specified is a super-user.

Also report the error message when the post-pg_ctl connection fails.

Per private bug report from EnterpriseDB.
This commit is contained in:
Bruce Momjian
2011-05-07 08:55:13 -04:00
parent 71932ecc2b
commit 81301b8578
2 changed files with 32 additions and 3 deletions

View File

@ -27,7 +27,7 @@ connectToServer(ClusterInfo *cluster, const char *db_name)
if (conn == NULL || PQstatus(conn) != CONNECTION_OK)
{
pg_log(PG_REPORT, "Connection to database failed: %s\n",
pg_log(PG_REPORT, "connection to database failed: %s\n",
PQerrorMessage(conn));
if (conn)
@ -189,7 +189,9 @@ start_postmaster(ClusterInfo *cluster)
if ((conn = get_db_conn(cluster, "template1")) == NULL ||
PQstatus(conn) != CONNECTION_OK)
{
if (conn)
pg_log(PG_REPORT, "\nconnection to database failed: %s\n",
PQerrorMessage(conn));
if (conn)
PQfinish(conn);
pg_log(PG_FATAL, "unable to connect to %s postmaster started with the command: %s\n"
"Perhaps pg_hba.conf was not set to \"trust\".\n",