From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, "Mr(dot) Aaron W(dot) Swenson" <titanofold(at)gentoo(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bug with pg_ctl -w/wait and config-only directories |
Date: | 2011-10-03 19:03:47 |
Message-ID: | 201110031903.p93J3ls04951@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Magnus Hagander wrote:
> >> So, you are saying that people who want config-only directories are just
> >> not people who normally use pg_ctl, because if they were, they would
> >> have reported the bug? ?That seems unlikely. ?I will admit the Gentoo
> >> case is exactly that.
> >
> > As Dave has pointed out there are many more people that use it, probably
> > most notably Debian/Ubuntu users.
> >
> >> So we just document that config-only directories don't work for pg_ctl
> >> and pg_upgrade?
> >>
> >
> > I'd rather not if it can be avoided.
>
> I think we "can live" with pg_ctl not working - since that problem has
> already been solved by these people - at least partially.
>
> Getting pg_upgrade to work would be a *lot* more important.
Well, the users are currently symlinking the config files into the real
data directory and running pg_upgrade that way --- we can document that
work-around.
> I'm not sure how big the overlap is - would it be easier if you moved
> the required functionality into pg_upgrade itself, as you mentioned at
> some point? As in, would it be easier to fix the config-only directory
> case for the limited subset of functionality that pg_upgrade needs?
Not really --- it is the -w/wait mode pg_upgrade needs. There is a lot
of new code in pg_ctl that reads the postmaster.pid file for socket
location, port number, etc, that doesn't make sense to duplicate.
Frankly, there is the huge problem that they might specify the data
directory on the command line --- that would be a bear to support.
I think the only sane fix is to require pg_ctl and pg_upgrade to specify
the config _and_ real data directory. The fact that PGDATA/-D currently
can point to a config-only directory means this will lead to a host of
confusion.
What would make more sense would be to add a PGCONFIG/-C parameter that
points to the config directory and make PGDATA/-D only point to the real
data directory. Yes, it is more work for simple config-only installs,
but it allows pg_ctl and pg_upgrade to work with some sanity.
--
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-10-03 19:07:54 | Re: [REVIEW] pg_last_xact_insert_timestamp |
Previous Message | Alvaro Herrera | 2011-10-03 19:03:04 | Re: Bug with pg_ctl -w/wait and config-only directories |