Re: Prepared statements fail after schema changes with surprising error

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Stephen Frost <sfrost(at)snowman(dot)net>, Peter van Hardenberg <pvh(at)pvh(dot)ca>, Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepared statements fail after schema changes with surprising error
Date: 2013-01-23 16:50:22
Message-ID: CA+TgmobRs3kYSr8vpoQyjK_LeO2z58mFtaMDGZcBJ_5bs10R3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 23, 2013 at 11:40 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Yeah, that is probably the major hazard IMO too. The designs sketched
> in this thread would be sufficient to ensure that DDL in one session's
> temp schema wouldn't have to invalidate plans in other sessions --- but
> is that good enough?
>
> Your point that the locking code doesn't quite cope with newly-masked
> objects makes me feel that we could get away with not solving the case
> for plan caching either. Or at least that we could put off the problem
> till another day. If we are willing to just change plancache's handling
> of search_path, that's a small patch that I think is easily doable for
> 9.3. If we insist on installing schema-level invalidation logic, it's
> not happening before 9.4.

I agree with that analysis. FWIW, I am pretty confident that the
narrower fix will make quite a few people significantly happier than
they are today, so if you're willing to take that on, +1 from me. I
believe the search-path-interpolation problem is a sufficiently
uncommon case that, in practice, it rarely comes up. That's not to
say that we shouldn't ever fix it, but I think the simpler fix will be
a 90% solution and people will be happy to have made that much
progress this cycle.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-01-23 16:58:04 Re: proposal: fix corner use case of variadic fuctions usage
Previous Message Robert Haas 2013-01-23 16:44:29 Re: CF3+4 (was Re: Parallel query execution)