Re: SYSCONFDIR, initdb and postgresql.conf

From: KM <km(at)xacrasis(dot)netx>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SYSCONFDIR, initdb and postgresql.conf
Date: 2010-11-22 00:43:47
Message-ID: 4ce9bcc3$0$22091$742ec2ed@news.sonic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2010-11-21, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> SYSCONFDIR is only used for global configuration files, like the default
> psqlrc or pg_service.conf.

OK, so it doesn't regard postgresql.conf and friends as conf files in
that sense.

> It would be pretty inappropriate to put postgresql.conf there
> because postgresql.conf is a per-cluster configuration file.

Debian does it with a hierarchy under /etc/postgres that reflects the
versions and clusters installed. E.g. /etc/postgres/8.4/main holds
the cluster-conf files for the 'main' cluster running 8.4.

> Having said that, you don't have to put postgresql.conf in the data
> directory if you don't want to. Just move it to where you do want it
> (along with the other cluster config files) and add an entry to it to
> point to the actual data directory. Beware that this arrangement isn't
> supported as fully as the default --- in particular, I think pg_ctl
> will have some trouble with it.

It wants a '-o' to tell postgres where its config is. Debian uses a
system of ingenious wrapper scripts that automatically set it. My
poor man's version seems to be working in my /etc/rc.local,

su -l _postgresql -c "nohup /usr/local/bin/pg_ctl start \
-D /var/postgresql/9.0/main -l /var/postgresql/logfile \
-o '-D /var/postgresql/9.0/main' \
-o '-c config_file=/etc/postgresql/9.0/main/postgresql.conf' \
>/dev/null"

> regards, tom lane

Thanks
--
KM

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2010-11-22 03:39:08 Re: Fwd: [pgsql-www] Forums at postgresql.com.au
Previous Message Elliot Chance 2010-11-21 23:40:34 Fwd: [pgsql-www] Forums at postgresql.com.au