Re: Start-up script for few clusters: just add water?

From: Piotr Kublicki <Piotr(dot)Kublicki(at)iop(dot)org>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Start-up script for few clusters: just add water?
Date: 2010-04-28 14:14:15
Message-ID: OFE470C1E8.947E2987-ON80257713.004E1F56-80257713.004E35B6@iop.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Merci!

Pete

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Piotr Kublicki <Piotr(dot)Kublicki(at)iop(dot)org>, pgsql-general
<pgsql-general(at)postgresql(dot)org>
Date: 28/04/2010 15:04
Subject: Re: [GENERAL] Start-up script for few clusters: just add water?

Le 28/04/2010 14:05, Piotr Kublicki a écrit :
> Hi Guillaume,
>
> Excellent point:
>
>> Suppose I have a second cluster. I'll have to do this :
>>
> cd /etc/init.d
> cp postgresql postgresql2
> cd /etc/sysconfig/pgsql
> cp postgresql postgresql2
> $EDITOR postgresql2
>
> In $EDITOR, I'll change the different environment values I want. For
> example:
>> PGPORT=5567
>> PGDATA=/db/second_cluster
>
> In such case the new created start-up script postgresql2 should not be
> modified in the following line:
>
> # Override defaults from /etc/sysconfig/pgsql if file is present
> [ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME}
>
> export PGDATA
> export PGPORT
>
> Or it will automatically match-up names from both directories, i.e.:
> /etc/init.d/postgresql will run /etc/sysconfig/pgsql/postgresql?
>
> /etc/init.d/postgresql2 will run /etc/sysconfig/pgsql/postgresql2
>

The latter. It will automatically match the script file name and the
config file name.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

This email (and attachments) are confidential and intended for the addressee(s) only. If you are not the intended recipient please notify the sender,
delete any copies and do not take action in reliance on it. Any views expressed are the author's and do not represent those of IOP, except where specifically
stated. IOP takes reasonable precautions to protect against viruses but accepts no responsibility for loss or damage arising from virus infection.
For the protection of IOP's systems and staff emails are scanned automatically.”

Institute of Physics Registered in England under Registration No 293851
Registered Office: 76/78 Portland Place, London W1B 1NT

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Mead 2010-04-28 14:37:55 Re: pg_hba.conf
Previous Message Tom Lane 2010-04-28 14:10:07 Re: Notification of Limited Account Access