Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1F165B5DBE9 for ; Thu, 23 Jun 2011 00:35:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 32797-05 for ; Thu, 23 Jun 2011 03:35:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id B1D7AB5D8BD for ; Thu, 23 Jun 2011 00:35:40 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 1734781E; Wed, 22 Jun 2011 23:35:40 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WS-m1Ume2naz; Wed, 22 Jun 2011 23:35:39 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id D80F527; Wed, 22 Jun 2011 23:35:38 -0400 (EDT) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id CB7C5AF269; Thu, 23 Jun 2011 11:35:37 +0800 (WST) Message-ID: <4E02B489.6070104@postnewspapers.com.au> Date: Thu, 23 Jun 2011 11:35:37 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Thunderbird/3.1.9 MIME-Version: 1.0 To: Tomas Enrique Cardozo Baudry CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6074: postgresql service script References: <201106221247.p5MClS5R015725@wwwmaster.postgresql.org> In-Reply-To: <201106221247.p5MClS5R015725@wwwmaster.postgresql.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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/194 X-Sequence-Number: 30573 On 22/06/11 20:47, Tomas Enrique Cardozo Baudry wrote: > > The following bug has been logged online: > > Bug reference: 6074 > Logged by: Tomas Enrique Cardozo Baudry > Email address: tomas.enrique.cardozo.baudry@gmail.com > PostgreSQL version: 8.4.4 > Operating system: Centos 5.6 > Description: postgresql service script > Details: > > 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 script should *not* respect values from the environment; it's a good thing that it doesn't. Otherwise setting PGPORT to tell psql what to do would as a side effect change what port the server listened on if you restarted it from that shell! What the script should do is get those settings from /etc/sysconfig or /etc/default (dunno which CentOS uses) so you don't have to hack the init script directly. -- Craig Ringer