Re: Yet another failure mode in pg_upgrade

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Yet another failure mode in pg_upgrade
Date: 2012-09-01 19:45:25
Message-ID: 20120901194525.GD13604@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 1, 2012 at 03:06:57PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Sat, Sep 1, 2012 at 02:43:35PM -0400, Tom Lane wrote:
> >> I'm inclined to think that the "no sockdir" case is broken and you
> >> should get rid of it. If you're starting a postmaster, you can and
> >> should tell it a sockdir, period. If you're running a live check this
> >> code is all moot anyway.
>
> > I don't think you understand. The "no sockdir" case is only for live
> > checks of pre-9.1 old servers, because we can't find the socket
> > directory being used. Everything else uses the local directory for the
> > socket. If we remove that case, we can't do live checks on pre-9.1
> > servers.
>
> If it's a live check, then (a) you aren't restarting the postmaster,
> and (b) you wouldn't want to lock out TCP anyway. So adding
> --listen-addresses to the string seems pointless and/or wrong.

What about the new server? That is still started and stopped. You are
right that this code is never going to be called for the check of a
running old server.

Let's walk through the options:

non-live check:
uses current directory, start/stop old/new servers

live check, old server >= 9.1:
only new server started/stopped, new server uses old server's
socket directory and PGHOST set so clients use the same directory

live check, old server < 9.1:
only new server started/stopped, old/new servers use their
default/configured socket directory

--
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-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-09-01 19:47:14 Re: Yet another failure mode in pg_upgrade
Previous Message Tom Lane 2012-09-01 19:06:57 Re: Yet another failure mode in pg_upgrade