Thread: Another 'db session' question...

Another 'db session' question...

From
"Taber, Mark"
Date:

First, thanks for all your responses.  The programmers have yet another question.  We will be connecting to a single pg db from our intranet application (web-based).  Each instance of this application will log on to the database using identical user id’s and passwords (we have a couple of network and workstation authentications above this).  Each application instance will have its own db session, correct?  (That is, because they will all be connecting to the pg db with the same user id and password, they won’t share a connection because of this fact, will they?)

 

Again, many thanks

 

Mark Taber

State of California

Department of Finance

Infrastructure & Architecture Unit

916.323.3104 x2945

 

Re: Another 'db session' question...

From
Bruce Momjian
Date:
Taber, Mark wrote:
> First, thanks for all your responses.  The programmers have yet another
> question.  We will be connecting to a single pg db from our intranet
> application (web-based).  Each instance of this application will log on to
> the database using identical user id's and passwords (we have a couple of
> network and workstation authentications above this).  Each application
> instance will have its own db session, correct?  (That is, because they will
> all be connecting to the pg db with the same user id and password, they
> won't share a connection because of this fact, will they?)

Right, the all get new connections.  Also, because you are using the
web, the connections will be new for each rendered page probably.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Another 'db session' question...

From
"Scott Marlowe"
Date:
On Wed, 2004-08-11 at 08:42, Taber, Mark wrote:
> First, thanks for all your responses.  The programmers have yet
> another question.  We will be connecting to a single pg db from our
> intranet application (web-based).  Each instance of this application
> will log on to the database using identical user id’s and passwords
> (we have a couple of network and workstation authentications above
> this).  Each application instance will have its own db session,
> correct?  (That is, because they will all be connecting to the pg db
> with the same user id and password, they won’t share a connection
> because of this fact, will they?)

Correct.  As long as you're not using some form of connection pooling or
reuse, each web client will have their own connection.

Note that if you're using php, I recommend avoiding pg_pconnect like the
plague, unless you know very specifically how to tune
apache/php/postgresql to handle the increased number of connections that
will remain forever open.