Re: BUG #11402: Prepared statement cache invalidation and unknown types - Mailing list pgsql-bugs

From Marko Tiikkaja
Subject Re: BUG #11402: Prepared statement cache invalidation and unknown types
Date
Msg-id 5412ACCD.8090609@joh.to
Whole thread Raw
In response to Re: BUG #11402: Prepared statement cache invalidation and unknown types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 9/12/14, 3:55 AM, Tom Lane wrote:
> marko@joh.to writes:
>> I hit the behaviour on 9.1 originally with functions, but tested it against
>> a reasonably fresh HEAD and it was still broken.  Somehow it seems that the
>> prepared statement isn't willing to forget the data type of the argument
>> after it has been resolved once (even though it was specified to be unknown
>> :-( ).  This leads to some grotesque cache invalidation code in our API.
>
> I'm not exactly convinced that this is a bug.  Having a prepared statement
> silently change its input parameter types seems a lot more dangerous than
> just failing; especially since we lack any signaling mechanism by which
> the client application could be warned that whatever it may have known
> about the statement is now invalid.

Yeah, that's probably fair.  I guess it's possible for an app to use
unknown type parameters and then ask the database about the data types
and do something different based on that.

I'll just have to live with the (increasingly) horrible logic.  Thanks
for your reply.


.marko

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #11399: CreateUser error when upgrading
Next
From: Roman Konoval
Date:
Subject: Re: Memory leak during delete with sequential scan