Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4816DB5D91F for ; Thu, 23 Jun 2011 00:52:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 30130-05 for ; Thu, 23 Jun 2011 03:52:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E3F0CB5D8BD for ; Thu, 23 Jun 2011 00:52:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p5N3qDgm013225; Wed, 22 Jun 2011 23:52:13 -0400 (EDT) To: Craig Ringer cc: Tomas Enrique Cardozo Baudry , pgsql-bugs@postgresql.org Subject: Re: BUG #6074: postgresql service script In-reply-to: <4E02B489.6070104@postnewspapers.com.au> References: <201106221247.p5MClS5R015725@wwwmaster.postgresql.org> <4E02B489.6070104@postnewspapers.com.au> Comments: In-reply-to Craig Ringer message dated "Thu, 23 Jun 2011 11:35:37 +0800" Date: Wed, 22 Jun 2011 23:52:13 -0400 Message-ID: <13224.1308801133@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/195 X-Sequence-Number: 30574 Craig Ringer writes: > On 22/06/11 20:47, Tomas Enrique Cardozo Baudry wrote: >> configuring the posgresql.conf on another port the service doesnt load the >> port variable, because in the postgresql service script is a variable PGPORT >> and this rewrite the configuration variable > I'm pretty sure that init script is part of CentOS (probably really part > of Red Hat Enterprise Linux), not part of PostgreSQL. The relevant part of the RHEL5 initscript is # Set defaults for configuration variables PGENGINE=/usr/bin PGPORT=5432 PGDATA=/var/lib/pgsql/data PGLOG=/var/lib/pgsql/pgstartup.log # Override defaults from /etc/sysconfig/pgsql if file is present [ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME} As this indicates, you are supposed to change those settings with a script in /etc/sysconfig/pgsql/ if you need to change 'em. It's intentional that those settings win out over postgresql.conf. I'm not entirely sure that the OP is using the RHEL RPMs, though, because the fragment he quoted didn't quite match this. regards, tom lane