Re: read-only planner input

From: Neil Conway <neilc(at)samurai(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: read-only planner input
Date: 2005-03-18 10:30:52
Message-ID: 423AADDC.9040607@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oliver Jowett wrote:
> What happens if (for example) DateStyle changes between the two parses?

From my original email:

This is the common case of a more general problem: a query plan depends
on various parts of the environment at plan-creation time. That
environment includes the definitions of database objects, but also GUC
variables (most importantly search_path, but also optimizer-tuning
variables for example), the state of database statistics, and so on.
I'll leave resolution of the more general problem to someone else -- I
think if we can manage to invalidate plans automatically when dependent
objects change, that's better than nothing.

I'm don't think recreating the plan from the query string changes this
fundamentally -- the interaction between (for example) GUC variables and
prepared plans will likely not be well-defined (which will be no worse
than it is today).

(It might be plausible to work something out where a backend-local SET
of some subset of the GUC variables flushes all the cached query plans,
but I'm don't have any plans to look at it myself.)

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shachar Shemesh 2005-03-18 12:02:08 Version 1.0.0.18 of OLE DB released
Previous Message Shachar Shemesh 2005-03-18 09:57:36 Unstable timestamp binary representation?