Re: Yet another failure mode in pg_upgrade

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Yet another failure mode in pg_upgrade
Date: 2012-09-02 11:17:01
Message-ID: 20120902111701.GB21043@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 2, 2012 at 01:06:28AM -0400, Robert Haas wrote:
> > For "live check" operation, you are checking a running server, so
> > assuming the socket is in the current directory is not going to work.
> > What the code does is to read the 5th line from the running server's
> > postmaster.pid file, which has the socket directory in PG >= 9.1. For
> > pre-9.1, pg_upgrade uses the compiled-in defaults for socket directory.
> > If the defaults are different between the two servers, the new binaries,
> > e.g. pg_dump, will not work. The fix is for the user to set pg_upgrade
> > -O to match the old socket directory, and set PGHOST before running
> > pg_upgrade. I could not find a good way to generate a proper error
> > message because we are blind to the socket directory in pre-9.1.
> > Frankly, this is a problem if the old pre-9.1 server is running in a
> > user-configured socket directory too, so a documentation addition seems
> > right here.
> >
> > So, in summary, this patch moves the socket directory to the current
> > directory all but live check operation, and handles different socket
> > directories for old cluster >= 9.1. I have added a documentation
> > mention of how to make this work for for pre-9.1 old servers.
>
> I don't think this is reducing the number of failure modes; it's just
> changing it from one set of obscure cases to a slightly different set
> of obscure cases.

Tom reported problems with having old/new with different default socket
locations. This fixes that, and reduces the possibility of acciental
connections. What problems does this add?

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-09-02 11:34:12 Re: Yet another failure mode in pg_upgrade
Previous Message Peter Geoghegan 2012-09-02 07:41:52 Re: bitmap scan much slower than index scan, hash_search_with_hash_value