pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedpostmaster & JDBC
2+ messages / 2 participants
[nested] [flat]
* postmaster & JDBC
@ 1999-07-07 00:49 Mike Engelhart <aengelhart@austin.rr.com>
0 siblings, 0 replies; 2+ messages in thread
From: Mike Engelhart @ 1999-07-07 00:49 UTC (permalink / raw)
To: pgsql-interfaces
Hi -
I'm a little confused at how the JDBC driver and the postmaster get along.
I have a servlet system built that uses connection pooling to create a
number of Connection objects to a PostgreSQL (6.5) database. I start out
by creating 5 connections and up that by 3 new ones if it runs out of
connections (which hasn't been an issue yet). Anyway, I just read the man
page for postmaster this evening and noticed this comment:
*****
Only one postmaster should be running at a time in a given Postgres
installation." Here, an installation means a database directory and
postmaster port number. You can run more than one postmaster on a machine
only if each one has a separate directory and port number.
*******
As I haven't been doing either of the aforementioned things (separate
directory and port number for each postmaster), is the JDBC driver doing
this for me? It seems that they must be all running on the same port
because I'm calling a DriverManager.getConnection() with the same URL.
Thanks for any explanation into how this works.
Mike
^ permalink raw reply [nested|flat] 2+ messages in thread
* RE: [INTERFACES] postmaster & JDBC
@ 1999-07-07 07:27 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Mount @ 1999-07-07 07:27 UTC (permalink / raw)
To: 'Mike Engelhart' <aengelhart@austin.rr.com>; pgsql-interfaces
[Correct me if I'm wrong here :-)]
The postmaster here is the main process. When any client (not just JDBC)
connects, it creates a new process, and that new process is what talks
to the client. There is only one postmaster.
The separate directory and port number is where in some rare cases, some
of us mad ones have different versions of the back end running on the
same machine (a production database and a development one). The rule
here is, unless you really need to do this, don't - it can be
horrendous. I'm actually thinking of setting up a new machine to handle
the development side of things.
As for having multiple connections, take a look at the source to the
JAVA/CORBA example (src/interfaces/jdbc/example/corba), as there is a
simple ConnectionManager class there that does exactly what you are
doing.
Peter
--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.
-----Original Message-----
From: Mike Engelhart [mailto:aengelhart@austin.rr.com]
Sent: 07 July 1999 01:49
To: pgsql-interfaces@postgreSQL.org
Subject: [INTERFACES] postmaster & JDBC
Hi -
I'm a little confused at how the JDBC driver and the postmaster get
along.
I have a servlet system built that uses connection pooling to create a
number of Connection objects to a PostgreSQL (6.5) database. I start
out
by creating 5 connections and up that by 3 new ones if it runs out of
connections (which hasn't been an issue yet). Anyway, I just read the
man
page for postmaster this evening and noticed this comment:
*****
Only one postmaster should be running at a time in a given
Postgres
installation." Here, an installation means a database directory and
postmaster port number. You can run more than one postmaster on a
machine
only if each one has a separate directory and port number.
*******
As I haven't been doing either of the aforementioned things (separate
directory and port number for each postmaster), is the JDBC driver doing
this for me? It seems that they must be all running on the same port
because I'm calling a DriverManager.getConnection() with the same URL.
Thanks for any explanation into how this works.
Mike
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-07-07 07:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-07 00:49 postmaster & JDBC Mike Engelhart <aengelhart@austin.rr.com>
1999-07-07 07:27 RE: [INTERFACES] postmaster & JDBC Peter Mount <petermount@it.maidstone.gov.uk>
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