Search Postgresql Archives

Re: pg_upgrade: "pg_ctl failed to start the new server"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 14, 2012 at 08:03:49AM -0400, Evan D. Hoffman wrote:
> So it appears the problem was inability to connect, although
> pg_upgrade reported that it couldn't start the server (I assume
> ability to connect is how it determines whether or not the server was
> started).

Ah, OK, so it was the connection that failed.  I wasn't aware pg_ctl
start could fail in that case (we added PGping), but obviously it can.

The attached patch applied to PG 9.2 and current will give a more
appropriate error message saying it might be a connection problem.

-- 
  Bruce Momjian  <bruce@xxxxxxxxxx>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/contrib/pg_upgrade/server.c b/contrib/pg_upgrade/server.c
new file mode 100644
index f83d6fa..57f09d4
*** a/contrib/pg_upgrade/server.c
--- b/contrib/pg_upgrade/server.c
*************** start_postmaster(ClusterInfo *cluster)
*** 193,199 ****
  
  	/* If the connection didn't fail, fail now */
  	if (pg_ctl_return != 0)
! 		pg_log(PG_FATAL, "pg_ctl failed to start the %s server\n",
  			   CLUSTER_NAME(cluster));
  
  	os_info.running_cluster = cluster;
--- 193,199 ----
  
  	/* If the connection didn't fail, fail now */
  	if (pg_ctl_return != 0)
! 		pg_log(PG_FATAL, "pg_ctl failed to start the %s server, or connection failed\n",
  			   CLUSTER_NAME(cluster));
  
  	os_info.running_cluster = cluster;
-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux