Second postmaster / second DB cluster

From: Oli Sennhauser <oli(dot)sennhauser(at)bluewin(dot)ch>
To: pgsql-admin(at)postgresql(dot)org
Subject: Second postmaster / second DB cluster
Date: 2003-10-16 14:51:41
Message-ID: 3F8EB07D.7040603@bluewin.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Adam Witney 2003-10-16 16:38:05 Re: question re crosstab query
Previous Message Christopher Browne 2003-10-16 14:43:53 Re: pg_hba.conf