Re: How to start several PostgreSQL clusters at boot time on a Debian OS

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: How to start several PostgreSQL clusters at boot time on a Debian OS
Дата
Msg-id CAECtzeVpKYJ22+TW1e-Swgp1S2Gu-=xWTJqu7qt_etS-3gbpwQ@mail.gmail.com
обсуждение исходный текст
Ответ на How to start several PostgreSQL clusters at boot time on a Debian OS  (Léa Massiot <lmhelp1@orange.fr>)
Ответы Re: How to start several PostgreSQL clusters at boot time on a Debian OS  (Léa Massiot <lmhelp1@orange.fr>)
Список pgsql-general
Hi,

2014-10-15 12:18 GMT+02:00 Léa Massiot <lmhelp1@orange.fr>:
Hello and thank you for reading my post.

My question is about starting PostgreSQL clusters at boot time.

The OS is Debian Wheezy.
I have installed PostgreSQL from the sources (postgresql-9.3.5.tar.gz) at
http://www.postgresql.org/ftp/source/v9.3.5/.

In a shell and logged as "unprivileged_user" (a user which is not "root"), I
presently have two clusters that I can start manually like this:
unprivileged_user> pg_ctl start -D /where/cluster1/is/located/pgcluster1 -l
/where/cluster1/is/located/pgcluster1.log
unprivileged_user> pg_ctl start -D /where/cluster2/is/located/pgcluster2 -l
/where/cluster2/is/located/pgcluster2.log

I would like to start the clusters at boot time and I would like them to be
started as the non-root user "unprivileged_user".
I would need a "/etc/init.d/" script...

Can you advise me how to do that?

There is one in PostgreSQL source files. Look into contrib/start-scripts directory. There is a linux script. Copy it under another name in the /etc/init.d/ directory. Duplicate it. And change it wrt to your installations.

Regards.


--

В списке pgsql-general по дате отправления:

Предыдущее
От: Léa Massiot
Дата:
Сообщение: How to start several PostgreSQL clusters at boot time on a Debian OS
Следующее
От: Léa Massiot
Дата:
Сообщение: Re: How to start several PostgreSQL clusters at boot time on a Debian OS