Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMZ3h-0002MO-6M for pgsql-bugs@postgresql.org; Fri, 12 Oct 2012 06:49:21 +0000 Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMZ3d-0007en-5Y for pgsql-bugs@postgresql.org; Fri, 12 Oct 2012 06:49:20 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id q9C6nD931817 for ; Thu, 11 Oct 2012 23:49:13 -0700 Message-ID: <5077BD64.30709@hogranch.com> Date: Thu, 11 Oct 2012 23:49:08 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -4.0 (----) X-Archive-Number: 201210/100 X-Sequence-Number: 34400 On 10/11/12 2:29 AM, david.peyrieres@meteo.fr wrote: > In my case, I've 5 databases on same server. Each database is start/stop > with this file 'service postgresql9.x start'. one database 'cluster' (instance of the postmaster, with a corresponding $PGDATA directory) can have any number of databases associated with it, they all share the same PID file. I'm not sure of ANY advantage of running multiple different instances of postgres for seperate databases. the way the newer RHEL init.d files are setup, if you DO want to run multiple copies, you create seperate init.d files, like postgresql-9.1a, postgresql-9.1b, etc, these can all be symlinks to the same postgresql-9.1 file. you then create corresponding files in /etc/sysconfig/pgsql/ with PGDATA=/path/to/unique/pgdata and PGPORT=54xx unique ports... like, as an example... # cat /etc/sysconfig/pgsql/postgresql-9.0b PGENGINE=/usr/pgsql-${PGMAJORVERSION}/bin PGPORT=5433 PGDATA=/ssd/pgsql/${PGMAJORVERSION}/data PGLOG=/ssd/pgsql/${PGMAJORVERSION}/pgstartup.log # ls -la /etc/rc.d/init.d/postgresql-9.0b lrwxrwxrwx 1 root root 14 Oct 23 2011 /etc/rc.d/init.d/postgresql-9.0b -> postgresql-9.0 by doing it this way, you're not editing any files that are under RPM package management, so you're not going to get bit during updates. -- john r pierce N 37, W 122 santa cruz ca mid-left coast