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

Re: Connection Pools and DISCARD ALL

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Pools and DISCARD ALL
Date: 2007-10-04 20:27:06
Message-ID: 47054C9A.2080005@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

Simon Riggs wrote:
> On Thu, 2007-10-04 at 13:03 -0700, Neil Conway wrote:
>   
>> On Thu, 2007-10-04 at 15:50 +0100, Simon Riggs wrote:
>>     
>>> On Thu, 2007-10-04 at 10:29 -0400, Tom Lane wrote:
>>>       
>>>>  Somebody who wants the
>>>> above behavior can send "ROLLBACK; DISCARD ALL".
>>>>         
>>> ...which generates an ERROR if no transaction is in progress and fills
>>> the log needlessly.
>>>       
>> Well, it's a WARNING, but your point is taken. Can't a clueful interface
>> just check what the transaction status of the connection is, rather than
>> unconditionally issuing a ROLLBACK?
>>     
>
> I think it can, but can't a clueful server do this and avoid the problem
> of non-clueful interfaces?
>
> This is making me think that we should just embed the session pool
> inside the server as well and have done with it.
>
>   

Could we maybe have some flavor of ROLLBACK that doesn't issue a warning 
if no transaction is in progress? There is precedent for this sort of 
facility - DROP ... IF EXISTS.

cheers

andrew

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-10-04 21:03:36
Subject: ecpg build now breaks mingw
Previous:From: Alvaro HerreraDate: 2007-10-04 20:24:43
Subject: Re: Connection Pools and DISCARD ALL

pgsql-patches by date

Next:From: Tom LaneDate: 2007-10-04 21:08:29
Subject: Re: Connection Pools and DISCARD ALL
Previous:From: Alvaro HerreraDate: 2007-10-04 20:24:43
Subject: Re: Connection Pools and DISCARD ALL

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