Re: pg_upgrade improvements - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_upgrade improvements
Date
Msg-id 20120412004018.GX3379@momjian.us
Whole thread Raw
In response to pg_upgrade improvements  (Harold Giménez <harold.gimenez@gmail.com>)
Responses Re: pg_upgrade improvements  (Harold Giménez <harold.gimenez@gmail.com>)
List pgsql-hackers
On Wed, Apr 04, 2012 at 07:26:58PM -0700, Harold Giménez wrote:
> Hi all,
> 
> I've written a pg_upgrade wrapper for upgrading our users (heroku)
> to postgres 9.1. In the process I encountered a specific issue that
> could easily be improved. We've had this process work consistently
> for many users both internal and external, with the exception of just
> a few for whom the process fails and required manual handholding.
> 
> Before it performs the upgrade, the pg_upgrade program starts the
> old cluster, does various checks, and then attempts to stop it. On
> occasion stopping the cluster fails - I've posted command output
> on a gist [1]. Manually running the pg_upgrade shortly afterwards
> succeeds. We believe stopping the cluster times out because there
> are other connections to the cluster that are established in that
> small window. There could be incoming connections for a number of
> reasons: either the user or the user's applications are reestablishing
> connections, or something like collectd on the localhost attempts to
> connect during that small window.

Well, we did address this in PG 9.2 by having pg_upgrade use a
non-default port number when starting servers, 50432.  You can do that
too in PG 9.1 by just specifying non-default port numbers when you run
pg_upgrade.  We do start the server with a special --binary-upgrade
mode, and we could do all sorts of connection limits in that mode, but
having the port number be different seemed the clearest solution.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade improvements
Next
From: Harold Giménez
Date:
Subject: Re: pg_upgrade improvements