pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oli Sennhauser <oli.sennhauser@bluewin.ch>
To: pgsql-admin@postgresql.org
Subject: Second postmaster / second DB cluster
Date: Thu, 16 Oct 2003 16:51:41 +0200
Message-ID: <3F8EB07D.7040603@bluewin.ch> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <3F8EB07D.7040603@bluewin.ch>
Permalink:  ../3F8EB07D.7040603@bluewin.ch/
Also on:    postgresql.org/message-id/3F8EB07D.7040603@bluewin.ch

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: oli.sennhauser@bluewin.ch
  Subject: Re: Second postmaster / second DB cluster
  In-Reply-To: <3F8EB07D.7040603@bluewin.ch>
  References: <3F8EB07D.7040603@bluewin.ch>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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