From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Lamar Owen <lamar(dot)owen(at)wgcr(dot)org> |
Cc: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Vince Vielhaber <vev(at)michvhf(dot)com>, "J(dot) M(dot) Brenner" <doom(at)kzsu(dot)stanford(dot)edu>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: location of the configuration files |
Date: | 2003-02-14 02:13:29 |
Message-ID: | 200302140213.h1E2DT210571@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Lamar Owen wrote:
> > First, a few conclusions:
>
> > We can't use /var/run because we need the postmaster to create
> > those, and it isn't root.
>
> It isn't without precedent to have a directory under /var/run. Maybe
> /var/run/postgresql. Under this one could have a uniquely named pid file. I
> say uniquely named so that multiple postmasters could run. Naming those
> files could be fun. /var/run/postgresql would be owned by the postmaster run
> user. This of course requires root to install -- but would be completely
> optional.
But how do you handle the default then, where you have postmaster.pid in
/data? Do we rename it to postmaster.pid.5432 so it can sit in
/var/run/postgresql alone with other backends?
Another issue is that pg_ctl looks at that file, so moving it around is
going to be tricky. Also, this brings up a new issue that pg_ctl all of
a sudden can't just look at $PGDATA but must instead grope through
postgresql.conf to find the data directory location. That could be
interesting. Of course, it can still supply the /data path on the
command line, but if we use only $PGCONFIG, we would need to have it
find /data automatically from postgresql.conf.
> > OK, first, we keep postmaster.pid and postmaster.opts in /data. We
> > can't put them in /var/run, and /data seems like the best spot for them.
>
> Can we make that configurable? The default in pgdata is fine; just having the
> option is good.
Basically, I am saying that unless someone wants to use this
configurability, it is going to cause code confusion so it is best
avoided.
`
> Yes. I'm thinking along the lines of this sort of structure:
> /etc
> |---postgresql
> |----- name of postmaster one (unique ID of some kind)
> |----- name of postmaster two
> .
> .
>
> Not difficult.
Yes, that would work easily.
> > We can also firm up stuff in 7.5 by removing PGDATA and -D, and perhaps
> > removing the other duplicate postmaster flags that have postgresql.conf
> > entries.
>
> Now I really _like_ this idea. By removing it to 7.5, and therefore
> deprecating it in 7.4, this brings best practice into effect.
>
> However, at the same time, I wouldn't be opposed to leaving them in place,
> either, for backwards compatibility.
The problem is that we would be having too many ways to specify the
/data directory.
I am now wondering if we even want pg_hba_dir and pg_ident_dir. Seems
we can assume they are in the same directory as postgresql.conf. That
leaves only data_dir as new for postgresql.conf.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-02-14 02:18:18 | Re: PostgreSQL Tuning Results |
Previous Message | Tom Lane | 2003-02-14 01:55:23 | Re: Someone's broken psql's connection-failure error reporting |