summaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/server.c
diff options
context:
space:
mode:
authorCédric Villemain2011-05-13 20:55:39 +0000
committerCédric Villemain2011-05-13 20:55:39 +0000
commite0c3b474d5436c7874aef36988f2646bdb890249 (patch)
tree49c41d2b8abbd9bae4096643d840859f3a02a08c /contrib/pg_upgrade/server.c
parent40cefa392974c73ec20deb3c15fb5111ed7fad17 (diff)
parent9bb6d9795253bb521f81c626fea49a704a369ca9 (diff)
Merge branch 'master' into analyze_cacheanalyze_cache
Diffstat (limited to 'contrib/pg_upgrade/server.c')
-rw-r--r--contrib/pg_upgrade/server.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/pg_upgrade/server.c b/contrib/pg_upgrade/server.c
index 935ce32a61..8fce305d2e 100644
--- a/contrib/pg_upgrade/server.c
+++ b/contrib/pg_upgrade/server.c
@@ -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,10 +189,11 @@ 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\".",
+ pg_log(PG_FATAL, "unable to connect to %s postmaster started with the command: %s\n",
CLUSTER_NAME(cluster), cmd);
}
PQfinish(conn);
@@ -265,6 +266,7 @@ check_for_libpq_envvars(void)
{
const char *value;
+ /* This allows us to see error messages in the local encoding */
if (strcmp(option->envvar, "PGCLIENTENCODING") == 0)
continue;