pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ray Madigan <ray@madigans.org>
To: Pgsql-Admin <pgsql-admin@postgresql.org>
Subject: Re: Multiple Postmasters
Date: Fri, 6 Sep 2002 15:25:07 -0700
Message-ID: <FMECIFCFLBDKCGEHNLJBEEDJDGAA.ray@madigans.org> (raw)
In-Reply-To: <FMECIFCFLBDKCGEHNLJBEECNDGAA.ray@madigans.org>

I have found my error thanks to a tip from dima.  The start of the init.d
script did a silly rm -f
/tmp/.s.PGSQL.* and i only want it to remove the lock for that instance.

Thanks

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Ray Madigan
Sent: Friday, September 06, 2002 10:07 AM
To: Pgsql-Admin
Subject: [ADMIN] Multiple Postmasters


I am attempting to create a database server with multiple harddrives where
each hard drive has an instance of postmaster managing the database cluster
on that drive.  Currently i am trying to get this scenario to work with two
instances, and after i get confidence that it will work i will do it for
more.

My environment is Linux 7.1 with PostgreSql 7.0.3

The database superuser is postgres and i create two environment variables
for that user

PGA=/bar/data
PGB=/foo/data

export PGA PGB

I create the data directory in each area and initdb each of the areas.

I copied /etc/rc.d/init.d/postgresql to postgrea and postgreb and changed
all references of
PGDATA to PGA and PGB respectively.  Also changes the hard paths to point to
the correct place.

I modified postmaster.opts.default to include options for a different port
for each instance of postmaster in the appropriate data areas.

I linked startup and shutdown deamons in the rc5.d and rc6.d directories,
rebooted and linux started each instance of postmaster as expected
/usr/bin/postmaster -i -p 5433
/usr/bin/postmaster -i -p 5434

I then logged in as postgres and initlocation on each data area.

I then attempted to create a user for each location

createuser -p 5433 abc
psql: connectDBStart ( ) -- connect() failed: No such file or directory
    Is the postmaster running at 'localhost'
    and accepting connections on Unix socket '5433'?
createuser: creation of user "abc" failed

createuser -p 5434 abc
CREATE USER

the second instance works and the first instance didn't.

Im stumped at this point.  Help please.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster




view thread (7+ messages)

Message-ID: <FMECIFCFLBDKCGEHNLJBEEDJDGAA.ray@madigans.org>
Permalink:  ../FMECIFCFLBDKCGEHNLJBEEDJDGAA.ray@madigans.org/
Also on:    postgresql.org/message-id/FMECIFCFLBDKCGEHNLJBEEDJDGAA.ray@madigans.org

 · 

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: ray@madigans.org
  Subject: Re: Multiple Postmasters
  In-Reply-To: <FMECIFCFLBDKCGEHNLJBEEDJDGAA.ray@madigans.org>
  References: <FMECIFCFLBDKCGEHNLJBEECNDGAA.ray@madigans.org> <FMECIFCFLBDKCGEHNLJBEEDJDGAA.ray@madigans.org>

* 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