RE: [INTERFACES] postmaster & JDBC

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Mike Engelhart'" <aengelhart(at)austin(dot)rr(dot)com>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: [INTERFACES] postmaster & JDBC
Date: 1999-07-07 07:27:57
Message-ID: 1B3D5E532D18D311861A00600865478CA057@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)austin(dot)rr(dot)com]
Sent: 07 July 1999 01:49
To: pgsql-interfaces(at)postgreSQL(dot)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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 1999-07-07 07:29:55 RE: [INTERFACES] Re: [PATCHES] Patch for JDBC timezone problems
Previous Message Tim Allen 1999-07-07 04:53:17 Re: [INTERFACES] Peculiar behaviour in libpq