Re: 'prepare' is not quite schema-safe - Mailing list pgsql-general

From Vlad
Subject Re: 'prepare' is not quite schema-safe
Date
Msg-id cd70c681050501220564cf735a@mail.gmail.com
Whole thread Raw
In response to Re: 'prepare' is not quite schema-safe  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 'prepare' is not quite schema-safe
List pgsql-general
btw, after re-reading the second part of your comment once again, I
have a (clarification) question:

so is it possible that a successfully prepared (and possibly a couple
of times already executed)  query will be invalidated by postgresql
for some reason (like lack of memory for processing/caching other
queries)? Assuming that no database structure changes has been
performed.

If the answer is YES, then it's important to double check that the
dbd::pg driver would try to handle such situation appropriate - like
re-prepare query with postgresql.


> Hmm.  The above is arguably a DBD::Pg bug: it should not expect that
> it's okay to use the same prepared statement in both cases.  I do not
> know what the spec is for "prepare_cached", but it sure seems that the
> concept is fraught with danger --- the client-side driver has very
> little hope of knowing what server-side events might be reasons to
> invalidate the query cache.  (Not that the server side is presently
> all that good about it, but at least the server side is fixable
> in principle ;-))
>
>                         regards, tom lane
>


--

Vlad

pgsql-general by date:

Previous
From: Vlad
Date:
Subject: Re: 'prepare' is not quite schema-safe
Next
From: Tom Lane
Date:
Subject: Re: 'prepare' is not quite schema-safe