Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D448743CEB9 for ; Thu, 19 Jan 2012 18:12:18 -0400 (AST) Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ro0DO-00065T-Ty for pgsql-admin@postgresql.org; Thu, 19 Jan 2012 22:12:19 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Ro0DC-0006Ow-67; Thu, 19 Jan 2012 17:12:02 -0500 Date: Thu, 19 Jan 2012 17:12:02 -0500 From: Bruce Momjian To: Alexander Fortin Cc: pgsql-admin@postgresql.org Subject: Re: Can't get pg_upgrade work for 8.4 Message-ID: <20120119221202.GA24409@momjian.us> References: <4EF0A59B.9080202@gmail.com> <4EFB29E2.3060104@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EFB29E2.3060104@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/103 X-Sequence-Number: 39015 On Wed, Dec 28, 2011 at 03:38:26PM +0100, Alexander Fortin wrote: > Seems that the problem resides in the pg_ctl packaged with Ubuntu > 10.04, the only way we found to fix this was to recompile Postgresql > 8.4.9 from sources using the following patch, than instruct > pg_upgrade (9.1.2) to use the hand compiled pg_ctl instead of the > original one (a raw symlink did the job). > > Here's the patch, maybe someone could need it. > > > *** pg_ctl.c.orig 2011-12-27 14:52:27.000000000 +0000 > --- pg_ctl.c 2011-12-27 15:20:25.000000000 +0000 > *************** > *** 503,509 **** > * probably timeout first > */ > snprintf(connstr, sizeof(connstr), > ! "dbname=postgres port=%s > connect_timeout=5", portstr); > > for (i = 0; i < wait_seconds; i++) > { > --- 503,509 ---- > * probably timeout first > */ > snprintf(connstr, sizeof(connstr), > ! "dbname=postgres port=%s connect_timeout=5 > host=localhost", portstr); > > for (i = 0; i < wait_seconds; i++) > { Sorry for the late reply. Did you have a PGHOST variable set to something? That might have caused the problem. Your change basically forces it to do a tcp connection to the local database --- the default is to do a unix-domain socket/local connection to the database. Glad you finally got it working. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +