From: Steve Crawford <scrawford@pinpointresearch.com>
To: Colin E Busse <ceb@pt.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Use a custom postgresql.conf?
Date: Tue, 29 Nov 2011 13:28:11 -0800
Message-ID: <4ED54E6B.9070008@pinpointresearch.com> (raw)
In-Reply-To: <OF5CBC4DF4.E3A95B50-ON85257957.0073E39E-85257957.0073F997@pt.com>
References: <OF5CBC4DF4.E3A95B50-ON85257957.0073E39E-85257957.0073F997@pt.com>
On 11/29/2011 01:06 PM, Colin E Busse wrote:
> Hello,
>
> I am trying to determine how to get postgres to use a custom
> postgresql.conf file that will be located in a directory other than
> the default postgresql.conf file. I would like it to be installed via
> an rc script so that the database setup can be part of a
> self-contained install. I do not want to use symbolic links, and I do
> not want to edit the default postgresql.conf file. I am using
> PostgreSQL version 8.4.4 on Red Hat Enterprise Linux 6. Currently, I
> am able to start the database using the following command, which
> specifies my custom postgresql.conf file:
>
> pg_ctl start -D /var/lib/pgsql/data -l /var/lib/pgsql/pgstartup.log -o
> "-c config_file='/<path-to-custom-config-file>/postgresql.conf'"
>
> Is there a way to set this up so that I can simply call:
>
> service postgresql start
>
> And have the database start using my config file?
>
Don't have RHEL6 handy so looking at a CentOS 5.3 box...
I *think* you should be able to put the custom settings in
/etc/sysconfig/pgsql/postgresql which is used by /etc/init.d/postgresql
to override its defaults. Set $PGOPTS to the custom additions to the
standard startup command.
The wiki page may be of help:
http://wiki.postgresql.org/wiki/PostgreSQL_on_RedHat_Linux
Cheers,
Steve
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: scrawford@pinpointresearch.com, ceb@pt.com
Subject: Re: Use a custom postgresql.conf?
In-Reply-To: <4ED54E6B.9070008@pinpointresearch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox