From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Browne <cbbrowne(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_upgrade defaulting to port 25432 |
Date: | 2011-06-29 00:42:39 |
Message-ID: | 201106290042.p5T0gdS22044@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
> On m?n, 2011-06-27 at 14:34 -0400, Bruce Momjian wrote:
> > Bruce Momjian wrote:
> > > Robert Haas wrote:
> > > > It's easier to read the patches if you do separate changes in separate
> > > > patches. Anyway, I'm a bit nervous about this hunk:
> > > >
> > > > + if (old_cluster.port == DEF_PGUPORT)
> > > > + pg_log(PG_FATAL, "When checking a live old server, "
> > > > + "you must specify the old server's port number.\n");
> > > >
> > > > Is the implication here that I'm now going to need to specify more
> > > > than 4 command-line options/environment variables for this to work?
> > >
> > > Yes, we don't inherit PGPORT anymore. Doing anything else was too
> > > complex to explain in the docs.
> >
> > But only if you are running --check on a live server. Otherwise, we
> > will just default to 50432 instead of 5432/PGPORT.
>
> "When checking a live server, the built-in default port number or the
> value of the environment variable PGPORT is used. But when performing
> an upgrade, a different port number is used by default, namely 50432,
> which can be overridden XXX [how?]"
>
> Seems pretty clear to me, as long as that last bit is figured out.
Not sure where you got that text --- I assume that was an old email. I
decided it was too complex to have PGPORT be honoroed only if there is a
live server, so I just always default to 50432 for both servers, and I
added this error check:
if (user_opts.check && is_server_running(old_cluster.pgdata))
{
*live_check = true;
+ if (old_cluster.port == DEF_PGUPORT)
+ pg_log(PG_FATAL, "When checking a live old server, "
+ "you must specify the old server's port number.\n");
OK?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-06-29 01:17:32 | Re: spinlock contention |
Previous Message | Florian Pflug | 2011-06-29 00:11:15 | Re: spinlock contention |