Re: DEALLOCATE ALL

From: Neil Conway <neilc(at)samurai(dot)com>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: PGSQL-Patches <pgsql-patches(at)postgresql(dot)org>, Andrzej Rusin <Andrzej(dot)Rusin(at)interia(dot)pl>
Subject: Re: DEALLOCATE ALL
Date: 2007-03-29 22:39:08
Message-ID: 460C400C.8040007@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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.

I agree with the other comments that RESET SESSION is the right API for
this, although we can also provide DEALLOCATE ALL, I suppose.

As to the implementation, calling hash_remove() in a loop seems a pretty
unfortunate way to clear a hash table -- adding a hash_reset() function
to the dynahash API would be cleaner and faster.

-Neil

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-03-29 22:46:51 Re: Small code clean-up
Previous Message Bruce Momjian 2007-03-29 22:07:57 Re: [PATCH] add CLUSTER table USING index (take 3)