pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedUse a custom postgresql.conf?
3+ messages / 3 participants
[nested] [flat]
* Use a custom postgresql.conf?
@ 2011-11-29 21:06 Colin E Busse <ceb@pt.com>
0 siblings, 2 replies; 3+ messages in thread
From: Colin E Busse @ 2011-11-29 21:06 UTC (permalink / raw)
To: pgsql-admin
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?
Thank you,
Colin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Use a custom postgresql.conf?
@ 2011-11-29 21:28 Steve Crawford <scrawford@pinpointresearch.com>
parent: Colin E Busse <ceb@pt.com>
1 sibling, 0 replies; 3+ messages in thread
From: Steve Crawford @ 2011-11-29 21:28 UTC (permalink / raw)
To: Colin E Busse <ceb@pt.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Use a custom postgresql.conf?
@ 2011-12-01 20:48 Frank Lanitz <frank@frank.uvena.de>
parent: Colin E Busse <ceb@pt.com>
1 sibling, 0 replies; 3+ messages in thread
From: Frank Lanitz @ 2011-12-01 20:48 UTC (permalink / raw)
To: pgsql-admin
Am 29.11.2011 22:06, schrieb Colin E Busse:
> Is there a way to set this up so that I can simply call:
>
> service postgresql start
You could patch your init-script located inside /etc/init.d or something
to do that. This might can get issues on regular system updates.
Cheers,
Frank
Attachments:
signature.asc (application/pgp-signature, 899B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-12-01 20:48 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-29 21:06 Use a custom postgresql.conf? Colin E Busse <ceb@pt.com>
2011-11-29 21:28 ` Steve Crawford <scrawford@pinpointresearch.com>
2011-12-01 20:48 ` Frank Lanitz <frank@frank.uvena.de>
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