pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Running 2 postmaster Instances on different ports
2+ messages / 2 participants
[nested] [flat]

* Running 2 postmaster Instances on different ports
@ 2004-10-05 17:12 Gonzales,S <gonzales_speedy@fastmail.fm>
  2004-10-05 20:43 ` Re: Running 2 postmaster Instances on different ports Wim Bertels <wim.bertels@dontlikespam.khleuven.be>
  0 siblings, 1 reply; 2+ messages in thread

From: Gonzales,S @ 2004-10-05 17:12 UTC (permalink / raw)
  To: 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?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Running 2 postmaster Instances on different ports
  2004-10-05 17:12 Running 2 postmaster Instances on different ports Gonzales,S <gonzales_speedy@fastmail.fm>
@ 2004-10-05 20:43 ` Wim Bertels <wim.bertels@dontlikespam.khleuven.be>
  0 siblings, 0 replies; 2+ messages in thread

From: Wim Bertels @ 2004-10-05 20:43 UTC (permalink / raw)
  To: 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.
"





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-10-05 20:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05 17:12 Running 2 postmaster Instances on different ports Gonzales,S <gonzales_speedy@fastmail.fm>
2004-10-05 20:43 ` Wim Bertels <wim.bertels@dontlikespam.khleuven.be>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox