Re: location of the configuration files

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 01:09:34
Message-ID: 200302140109.h1E19Yo05511@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Lamar Owen wrote:
> This isn't the same environment, Bruce, that you got into back when it was
> still Postgres95. We are in the big leagues OS-wise, and we need to act like
> it. Assuming that we are a 'userspace' program (which is a misnomer anyway,
> as _anything_ non-kernel is 'userspace') is not going to cut it anymore.

So you are saying this isn't my grandma's database anymore. :-)

Anyway, I think I have _a_ proposal that we can use to work toward a
goal.

First, a few conclusions:

We can't use /var/run because we need the postmaster to create
those, and it isn't root.

Right now, the fact that we mix the config stuff with the
data isn't ideal. Someone mentioned:

pg_dumpall > foo && rm -rf $PGDATA && initdb

discards all the config files.

So, I propose we change a few things. The good news is that this is
something only administrators deal with; client apps don't deal with
it.

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.

That leaves postgresql.conf, pg_hba.conf, and pg_ident.conf. I
recommend moving them all, by default, into pgsql/etc. I recommend we
add these to postgresql.conf:

data_dir = ../data
pg_hba_dir = ./
pg_ident_dir = ./

Those paths are relative to postgresql.conf.

We then add a PGCONFIG variable and postmaster -C flag to point to the
config _directory_. That way, if folks want to move all of this into
/etc, then easily do that. This also pulls those files out of /data so
they are easier to back up.

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.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Brown 2003-02-14 01:22:18 Location of the configuration files, round 2
Previous Message Bruce Momjian 2003-02-14 00:38:19 Re: java access to the backend (non jdbc)?