Re: Running 2 postmaster Instances on different ports

Поиск
Список
Период
Сортировка
От Wim Bertels
Тема Re: Running 2 postmaster Instances on different ports
Дата
Msg-id 1097009037.291692@seven.kulnet.kuleuven.ac.be
обсуждение исходный текст
Ответ на Running 2 postmaster Instances on different ports  ("Gonzales,S" <gonzales_speedy@fastmail.fm>)
Список pgsql-admin
> Environement: debian, postgresql 7.4.5
>
> This is my problem:
> "/etc/init.d/postgresql2 restart
> Stopping PostgreSQL database server: postmasterpg_ctl: could not find
> /var/lib/postgres/data2/postmaster.pid
> Is postmaster running?
> .
> Starting PostgreSQL database server: postmaster(FAILED)
> ERROR: pg_ctl: Another postmaster may be running.  Trying to start
> postmaster anyway.
> pg_ctl: cannot start postmaster
> Examine the log output."
>
> The problem seems to be the "/etc/postmaster.conf",
> this file seems to be used by both postmaster instances,
> but since both postmaster instances have different data-dirs (two
> different clusters), this is a problem. I would like the two clusters to
> be started at boottime automatically.
>
> I changed all the references in the "/etc/init.d/postgresql2" script to
> the files in data-dir of second instance (with an adapted copy
> postmaster.conf), but still this doesnt do the trick.
>
> How do i solve this problem?

for now i just adapted a copy of the config files,
made a adapted copy of postgresql script under init.d,
and made an adapted copy of the postmaster-startup script
, so it works, but not in elegant, well manageable way
(->it would be better just needing the config files, all located in the data
dirs would the most easy and readible i suppose?)

its maybe debian specific:
eg:
"topic: running cleanly multiple instances of the postmaster (thus having
multiple cluster dbs)
[-> simple putted: thus needing multiple config files]

at this moment debian is set up with a single /etc/postgresql dir for the
configuration of postgres.
the instances starting the services read from this dir.
(the files in this dir are symbollicaly linked, doenst matter).

the problem arises when one tries to start another instance of the
postmaster on a different port,
this can be done, no problem, but not in such a nice way a the first
instance (eg i like a clean script that ensures me a running instance at
startup). why? because this instance also reads from the same
/etc/postgresql dir , but the eg the data dir is different, the connection
port is different and so on..

the solution (in my opinion): don't put the config files under the
/etc/postgresql dir, just put symbolic links to the data dir of every
cluster db; in this datadir the right config files can then be found for the
appropiate instance,
and the meaning of the /etc dir remains valid.
"



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

Предыдущее
От: "Steubesand Thomas"
Дата:
Сообщение: Re: Building pgadmin3 from source
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: installing PostgreSql in silent mode on windows