pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedmultiple postmasters
7+ messages / 4 participants
[nested] [flat]
* multiple postmasters
@ 2001-01-10 18:26 David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 18:56 ` Re: multiple postmasters Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 7+ messages in thread
From: David Mehringer @ 2001-01-10 18:26 UTC (permalink / raw)
To: pgsql-admin
Hi,
We're running postgresql 7.0.2 on solaris 5.7. The admin docs say that only
one postmaster process should be running. However, our "master" postmaster
process (PID=560 below) appears to have spawned off a couple of other
postmaster processes:
UID PID PPID C STIME TTY TIME CMD
bimaadm 560 1 0 Nov 27 ? 1:24 /appl/bima/pgsql/bin/postmaster -S -i
bimaadm 10237 560 0 17:16:53 ? 0:04 /appl/bima/pgsql/bin/postmaster -S -i
bimaadm 10240 560 0 17:17:00 ? 0:06 /appl/bima/pgsql/bin/postmaster -S -i
Is this normal? If not, what could be the cause of this? Our user
interface currently processes queries using the Pg.pm perl module and the
JDBC interface.
Thanks
Dave
--
David Mehringer, Ph.D. University of Illinois
dmehring@astro.uiuc.edu National Center for Supercomputing
Research Scientist, Applications/Department of Astronomy
Software Applications Developer, 1002 W. Green St.
BIMA Data Archivist Urbana, IL 61801 USA
voice: 217 244 5468 fax: 217 244 7638
http://monet.astro.uiuc.edu/~dmehring/dmehring.html
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: multiple postmasters
2001-01-10 18:26 multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
@ 2001-01-10 18:56 ` Peter Eisentraut <peter_e@gmx.net>
2001-01-10 19:34 ` Re: multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
0 siblings, 1 reply; 7+ messages in thread
From: Peter Eisentraut @ 2001-01-10 18:56 UTC (permalink / raw)
To: David Mehringer <dmehring@astro.uiuc.edu>; +Cc: pgsql-admin
David Mehringer writes:
> We're running postgresql 7.0.2 on solaris 5.7. The admin docs say that only
> one postmaster process should be running.
The docs are wrong in that case. Can you name chapter and section so we
can fix it?
> However, our "master" postmaster
> process (PID=560 below) appears to have spawned off a couple of other
> postmaster processes:
>
> UID PID PPID C STIME TTY TIME CMD
> bimaadm 560 1 0 Nov 27 ? 1:24 /appl/bima/pgsql/bin/postmaster -S -i
> bimaadm 10237 560 0 17:16:53 ? 0:04 /appl/bima/pgsql/bin/postmaster -S -i
> bimaadm 10240 560 0 17:17:00 ? 0:06 /appl/bima/pgsql/bin/postmaster -S -i
>
> Is this normal? If not, what could be the cause of this?
Notice how the PPID (parent pid) of the second and third process refers to
the first one. The first process is the "postmaster" you started (by init
apparently), the second and third ones got forked to handle connections.
(one process per connection)
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: multiple postmasters
2001-01-10 18:26 multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 18:56 ` Re: multiple postmasters Peter Eisentraut <peter_e@gmx.net>
@ 2001-01-10 19:34 ` David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 20:06 ` Re: multiple postmasters Ross J. Reedstrom <reedstrm@rice.edu>
0 siblings, 1 reply; 7+ messages in thread
From: David Mehringer @ 2001-01-10 19:34 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-admin
On Wed, 10 Jan 2001, Peter Eisentraut wrote:
>
> > We're running postgresql 7.0.2 on solaris 5.7. The admin docs say that only
> > one postmaster process should be running.
>
> The docs are wrong in that case. Can you name chapter and section so we
> can fix it?
>
Hi,
Thanks for the quick response. I was looking around the postgresql website
for info regarding this and came across a sentence about it. Unfortunately,
I can not find it again. Will let you know if I come across it in the
future. The sentence I read may actually have meant that *the
administrator* should not start more than one postmaster process, in which
case I misinterpreted it.
--
David Mehringer, Ph.D. University of Illinois
dmehring@astro.uiuc.edu National Center for Supercomputing
Research Scientist, Applications/Department of Astronomy
Software Applications Developer, 1002 W. Green St.
BIMA Data Archivist Urbana, IL 61801 USA
voice: 217 244 5468 fax: 217 244 7638
http://monet.astro.uiuc.edu/~dmehring/dmehring.html
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: multiple postmasters
2001-01-10 18:26 multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 18:56 ` Re: multiple postmasters Peter Eisentraut <peter_e@gmx.net>
2001-01-10 19:34 ` Re: multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
@ 2001-01-10 20:06 ` Ross J. Reedstrom <reedstrm@rice.edu>
2001-01-10 20:51 ` Re: multiple postmasters Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 7+ messages in thread
From: Ross J. Reedstrom @ 2001-01-10 20:06 UTC (permalink / raw)
To: David Mehringer <dmehring@astro.uiuc.edu>; +Cc: pgsql-admin
On Wed, Jan 10, 2001 at 01:34:34PM -0600, David Mehringer wrote:
> On Wed, 10 Jan 2001, Peter Eisentraut wrote:
> >
> > > We're running postgresql 7.0.2 on solaris 5.7. The admin docs say that only
> > > one postmaster process should be running.
> >
> > The docs are wrong in that case. Can you name chapter and section so we
> > can fix it?
> >
> Hi,
> Thanks for the quick response. I was looking around the postgresql website
> for info regarding this and came across a sentence about it. Unfortunately,
> I can not find it again. Will let you know if I come across it in the
> future. The sentence I read may actually have meant that *the
> administrator* should not start more than one postmaster process, in which
> case I misinterpreted it.
>
Dave,
Another aspect of this problem is that, on most platforms, the children
of postmaster that are forked for each connection rename themselves
to 'postgres'. The code for this was changed, recently, due to some
potential speed, security, or portability problems (I'm not sure off
the top of my head). You may be on a platform that no longer renames,
so you'll end up with multiple processes names 'postmaster', and have
to track down which is which they way Peter pointed out.
Ross
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: multiple postmasters
2001-01-10 18:26 multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 18:56 ` Re: multiple postmasters Peter Eisentraut <peter_e@gmx.net>
2001-01-10 19:34 ` Re: multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 20:06 ` Re: multiple postmasters Ross J. Reedstrom <reedstrm@rice.edu>
@ 2001-01-10 20:51 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 7+ messages in thread
From: Peter Eisentraut @ 2001-01-10 20:51 UTC (permalink / raw)
To: Ross J. Reedstrom <reedstrm@rice.edu>; +Cc: David Mehringer <dmehring@astro.uiuc.edu>; pgsql-admin
Ross J. Reedstrom writes:
> Another aspect of this problem is that, on most platforms, the children
> of postmaster that are forked for each connection rename themselves
> to 'postgres'. The code for this was changed, recently, due to some
> potential speed, security, or portability problems (I'm not sure off
> the top of my head). You may be on a platform that no longer renames,
No, the code was changed to work on more platforms, not less. I think on
Solaris you need to use /usr/ucb/bin/ps (BSD style) rather than
/usr/bin/ps (SysV style) to see the altered information.
> so you'll end up with multiple processes names 'postmaster', and have
> to track down which is which they way Peter pointed out.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
^ permalink raw reply [nested|flat] 7+ messages in thread
* Multiple Postmasters
@ 2002-09-06 17:06 Ray Madigan <ray@madigans.org>
2002-09-06 22:25 ` Re: Multiple Postmasters Ray Madigan <ray@madigans.org>
0 siblings, 1 reply; 7+ messages in thread
From: Ray Madigan @ 2002-09-06 17:06 UTC (permalink / raw)
To: pgsql-admin
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.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Multiple Postmasters
2002-09-06 17:06 Multiple Postmasters Ray Madigan <ray@madigans.org>
@ 2002-09-06 22:25 ` Ray Madigan <ray@madigans.org>
0 siblings, 0 replies; 7+ messages in thread
From: Ray Madigan @ 2002-09-06 22:25 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2002-09-06 22:25 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-10 18:26 multiple postmasters David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 18:56 ` Peter Eisentraut <peter_e@gmx.net>
2001-01-10 19:34 ` David Mehringer <dmehring@astro.uiuc.edu>
2001-01-10 20:06 ` Ross J. Reedstrom <reedstrm@rice.edu>
2001-01-10 20:51 ` Peter Eisentraut <peter_e@gmx.net>
2002-09-06 17:06 Multiple Postmasters Ray Madigan <ray@madigans.org>
2002-09-06 22:25 ` Re: Multiple Postmasters Ray Madigan <ray@madigans.org>
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