diff options
Diffstat (limited to 'src/bin/pg_ctl/pg_ctl.c')
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 4cfc3941d9c..970fb391398 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -4,7 +4,7 @@ * * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.81 2007/07/02 21:58:31 mha Exp $ + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.82 2007/07/08 19:07:38 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -480,15 +480,18 @@ test_postmaster_connection(bool do_checkpoint) if (!*portstr) snprintf(portstr, sizeof(portstr), "%d", DEF_PGPORT); - /* We need to set a connect timeout otherwise on Windows the SCM will probably timeout first */ - snprintf(connstr, sizeof(connstr), "dbname=postgres port=%s connect_timeout=5", portstr); + /* + * We need to set a connect timeout otherwise on Windows the SCM will + * probably timeout first + */ + snprintf(connstr, sizeof(connstr), + "dbname=postgres port=%s connect_timeout=5", portstr); for (i = 0; i < wait_seconds; i++) { if ((conn = PQconnectdb(connstr)) != NULL && (PQstatus(conn) == CONNECTION_OK || - (strcmp(PQerrorMessage(conn), - PQnoPasswordSupplied) == 0))) + PQconnectionUsedPassword(conn))) { PQfinish(conn); success = true; |