Re: DEALLOCATE ALL - Mailing list pgsql-patches

From Neil Conway
Subject Re: DEALLOCATE ALL
Date
Msg-id 460C400C.8040007@samurai.com
Whole thread Raw
In response to DEALLOCATE ALL  ("Marko Kreen" <markokr@gmail.com>)
Responses Re: DEALLOCATE ALL  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCH] add CLUSTER table USING index (take 3)
Next
From: Bruce Momjian
Date:
Subject: Re: Small code clean-up