Re: SYSCONFDIR, initdb and postgresql.conf

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: KM <km(at)xacrasis(dot)netx>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SYSCONFDIR, initdb and postgresql.conf
Date: 2010-11-21 16:54:35
Message-ID: 22217.1290358475@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

KM <km(at)xacrasis(dot)netx> writes:
> On an OpenBSD machine I just compiled and installed 9.0.1. The
> ./configure arguments included '--sysconfdir=/etc'. Running
> 'pg_config --sysconfdir' returns '/etc/postgresql'. The cluster is
> running and I can create a database and connect to it.

> However, initdb put the config files in the directory named by the
> --pgdata option. There is no directory /etc/postgresql.

> Should I expect this? How do I persuade postgres to put its config
> under /etc?

SYSCONFDIR is only used for global configuration files, like the default
psqlrc or pg_service.conf. It would be pretty inappropriate to put
postgresql.conf there because postgresql.conf is a per-cluster
configuration file.

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stuart McGraw 2010-11-21 17:03:52 Re: [pgsql-www] Forums at postgresql.com.au
Previous Message Dmitriy Igrishin 2010-11-21 15:55:53 Re: finding rows with invalid characters