Re: PostgreSQL configuration - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: PostgreSQL configuration
Date
Msg-id 200404121657.i3CGvLh02767@candle.pha.pa.us
Whole thread Raw
In response to Re: PostgreSQL configuration  (pgsql@mohawksoft.com)
Responses Re: PostgreSQL configuration  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PostgreSQL configuration  (pgsql@mohawksoft.com)
List pgsql-hackers
pgsql@mohawksoft.com wrote:
> > The bottom line to me is that config versus data ought to be a one-to-
> > many relationship, at least if you accept the premise that shared config
> > is reasonable at all.  Putting a datadir spec inside the config file
> > makes it impossible to share config files across datadirs, and so that
> > seems to conflict with the argument (which is being made in support of
> > this very same patch) that sharable config is good.  On the other hand,
> > if you make data point to config then you have a very natural way to
> > manage the one-to-many relationship.
> >
> > Separate -C and -D would make sense if it were a many-to-many
> > relationship (ie, you could sensibly use many different configs with the
> > same data dir), but the case for multiple configs with one data dir
> > seems pretty weak to me, and outweighed by the risk factors.
> 
> I hear "risk" but what risk?

OK, you look at your postgresql.conf file, and it says the data is in
/var/data, but the postgresql.conf file was found via PGDATA, so it is
ignored, and the directory is /var/local/pgsql.  That seems confusing
because someone looking at the file sees the wrong information.

For me, having a config file that both "is found" with ignored values,
and another mode where the config file points to everything seems
strange.  Does any other OS project do this?

What if someone does -C /var/data/postgresql.conf, and postgresql.conf
say to use /usr/local/data for data, what do we do?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: pgsql@mohawksoft.com
Date:
Subject: Re: PostgreSQL configuration
Next
From: Andrew Sullivan
Date:
Subject: Re: Solaris initdb fails: shmmax tweak alternative?