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

Re: DEALLOCATE ALL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Marko Kreen <markokr(at)gmail(dot)com>, PGSQL-Patches <pgsql-patches(at)postgresql(dot)org>, Andrzej Rusin <Andrzej(dot)Rusin(at)interia(dot)pl>
Subject: Re: DEALLOCATE ALL
Date: 2007-03-27 17:49:39
Message-ID: 29372.1175017779@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Marko Kreen wrote:
>> When pooling connections where prepared statements are in use,
>> it is hard to give new client totally clean connection as
>> there may be allocated statements that give errors when
>> new client starts preparing statements again.

> Huh, didn't we have a RESET SESSION command to do just that?  What about
> cursors, for example?

We don't actually *have* one, but I believe it was agreed that that is
the right API to provide.  If a pooler has to remember to clear prepared
statements, GUCs, cursors, and who knows what else, it'll be perpetually
broken because there'll be something it omits.

There might be a use-case for DEALLOCATE ALL, but needs of poolers
aren't it.  I'd be inclined to vote against this unless someone can
point to a better use-case.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: David FetterDate: 2007-03-27 18:08:44
Subject: Re: Arrays of Complex Types
Previous:From: Bruce MomjianDate: 2007-03-27 17:34:20
Subject: Re: Recalculating OldestXmin in a long-running vacuum

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