Skip site navigation (1) Skip section navigation (2)

Connection Pools and DISCARD ALL

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Connection Pools and DISCARD ALL
Date: 2007-10-04 14:11:22
Message-ID: (view raw or whole thread)
Lists: pgsql-hackerspgsql-patches
There's been a lively discussion on JDBC list recently about how we
handle connection pooling. This has connected a few thoughts in my head.

That's made me think about the PHP interface, which issues a 
pair every time somebody connects to the pool.

We should have a single/consistent way of starting a new connection to
PostgreSQL when using a session pool.

As committed, DISCARD ALL does everything but cannot be issued inside a
transaction block.

I'd like to propose that DISCARD ALL also issue a ROLLBACK command if it
is issued from within a transaction block. That way whenever we reassign
a session pool connection to another agent we can just issue a single
command from all interfaces, without needing to test what the state of
the connection is beforehand.

  Simon Riggs


pgsql-hackers by date

Next:From: Shane AmblerDate: 2007-10-04 14:25:14
Subject: Re: Why does the sequence skip a number with generate_series?
Previous:From: Tom LaneDate: 2007-10-04 14:09:05
Subject: Re: Not *quite* there on ecpg fixes

pgsql-patches by date

Next:From: Tom LaneDate: 2007-10-04 14:29:00
Subject: Re: Connection Pools and DISCARD ALL
Previous:From: ITAGAKI TakahiroDate: 2007-10-04 10:11:27
Subject: Re: initdb of regression test failed.

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group