Re: Can't get pg_upgrade work for 8.4

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alexander Fortin <alexander(dot)fortin(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Can't get pg_upgrade work for 8.4
Date: 2012-01-19 22:12:02
Message-ID: 20120119221202.GA24409@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Samuel Hwang 2012-01-19 22:43:38 Re: Help! PostgreSQL stuck at starting up after crash
Previous Message Kevin Grittner 2012-01-19 17:16:39 Re: Help! PostgreSQL stuck at starting up after crash