pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Second postmaster / second DB cluster
2+ messages / 2 participants
[nested] [flat]

* Second postmaster / second DB cluster
@ 2003-10-16 14:51  Oli Sennhauser <oli.sennhauser@bluewin.ch>
  0 siblings, 1 reply; 2+ messages in thread

From: Oli Sennhauser @ 2003-10-16 14:51 UTC (permalink / raw)
  To: pgsql-admin

Hello Admins

I would like to start a second postmaster on my server.
First problem was the lock file /tmp/.s.PGSQL.5432.lock
and its socket. But you can workaround that by the -k
parameter. So I was able to start at least 3 clusters...

But then I run into the problem with the psql-Client. It
was not able to connect anymore. Finally I was able to
isolate the problem on the -k parameter as the commands
below show. But without a propper running -k I do not
see a proper way to solve the problem.

Could someone please explain me, why

1. the lock file is located in /tmp and not e.g. in the
    preseen directory /var/lock or like ORACLE does in a
    directory called $PG_BASE/data/CLUSTER1 ?
    In my opinion /tmp is to dangerous for such a
    important file?

2. how do I properly start a second postmaster?

I found many comments like

  * Removing the lock file (igitigit!)
  * "i don't know why you would like to run multiple postmaster"
    --> In a perfect world there is may be no reason?

but now solutions.

Thanks for helping
Oli

Examples

nohup postmaster -D /u00/app/pgsql/data/CLUSTER1 \
                  >>/u00/app/pgsql/data/CLUSTER1/CLUSTER1.log 2>&1 &
--> OK

nohup postmaster -D /u00/app/pgsql/data/CLUSTER1 \
                  -p 5432 \
                  >>/u00/app/pgsql/data/CLUSTER1/CLUSTER1.log 2>&1 &
--> OK

nohup postmaster -D /u00/app/pgsql/data/CLUSTER1 \
                  -p 5433 \
                  >>/u00/app/pgsql/data/CLUSTER1/CLUSTER1.log 2>&1 &
--> OK

nohup postmaster -D /u00/app/pgsql/data/CLUSTER1 \
                  -p 5432 \
                  -k /u00/app/pgsql/data/CLUSTER1 \
                  >>/u00/app/pgsql/data/CLUSTER1/CLUSTER1.log 2>&1 &
--> ERR
postgres@master:~/data/CLUSTER1> psql -l
psql: could not connect to server: No such file or directory
         Is the server running locally and accepting
         connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

-------------------------------------------------------

Oli Sennhauser
Database-Engineer (Oracle & PostgreSQL)
Rebenweg 6
CH - 8610 Uster
Telefon 01 940 24 82 oder 079 450 49 14




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

* Re: Second postmaster / second DB cluster
@ 2003-10-16 17:07  Stephan Szabo <sszabo@megazone.bigpanda.com>
  parent: Oli Sennhauser <oli.sennhauser@bluewin.ch>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephan Szabo @ 2003-10-16 17:07 UTC (permalink / raw)
  To: Oli Sennhauser <oli.sennhauser@bluewin.ch>; +Cc: pgsql-admin

On Thu, 16 Oct 2003, Oli Sennhauser wrote:

> I would like to start a second postmaster on my server.
> First problem was the lock file /tmp/.s.PGSQL.5432.lock
> and its socket. But you can workaround that by the -k
> parameter. So I was able to start at least 3 clusters...

If you want to use separate directories for the socket, you
need to use -h <directory>  (and -p <port> if it's not the default)
when connecting with psql.  However, you probably just want to
use different port numbers to start the postmasters and then use
psql -p <port> to connect.



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


end of thread, other threads:[~2003-10-16 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-16 14:51 Second postmaster / second DB cluster Oli Sennhauser <oli.sennhauser@bluewin.ch>
2003-10-16 17:07 ` Stephan Szabo <sszabo@megazone.bigpanda.com>

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