postgresql/src/include
Tom Lane 0d5fbdc157 Change plan caching to honor, not resist, changes in search_path.
In the initial implementation of plan caching, we saved the active
search_path when a plan was first cached, then reinstalled that path
anytime we needed to reparse or replan.  The idea of that was to try to
reselect the same referenced objects, in somewhat the same way that views
continue to refer to the same objects in the face of schema or name
changes.  Of course, that analogy doesn't bear close inspection, since
holding the search_path fixed doesn't cope with object drops or renames.
Moreover sticking with the old path seems to create more surprises than
it avoids.  So instead of doing that, consider that the cached plan depends
on search_path, and force reparse/replan if the active search_path is
different than it was when we last saved the plan.

This gets us fairly close to having "transparency" of plan caching, in the
sense that the cached statement acts the same as if you'd just resubmitted
the original query text for another execution.  There are still some corner
cases where this fails though: a new object added in the search path
schema(s) might capture a reference in the query text, but we'd not realize
that and force a reparse.  We might try to fix that in the future, but for
the moment it looks too expensive and complicated.
2013-01-25 14:14:41 -05:00
..
access Redefine HEAP_XMAX_IS_LOCKED_ONLY 2013-01-24 16:10:02 -03:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Change plan caching to honor, not resist, changes in search_path. 2013-01-25 14:14:41 -05:00
commands Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
foreign Update copyrights for 2013 2013-01-01 17:15:01 -05:00
lib Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq Update copyrights for 2013 2013-01-01 17:15:01 -05:00
mb Update copyrights for 2013 2013-01-01 17:15:01 -05:00
nodes Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
optimizer Update copyrights for 2013 2013-01-01 17:15:01 -05:00
parser Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
port Add URLs to document why DLLIMPORT is needed on Windows. 2012-11-07 15:01:25 -05:00
portability Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Fix background workers for EXEC_BACKEND 2013-01-02 12:01:14 -03:00
regex Re-implement extraction of fixed prefixes from regular expressions. 2012-07-10 14:54:37 -04:00
replication Fix more issues with cascading replication and timeline switches. 2013-01-23 10:19:20 +02:00
rewrite Update copyrights for 2013 2013-01-01 17:15:01 -05:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
tcop Update copyrights for 2013 2013-01-01 17:15:01 -05:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Change plan caching to honor, not resist, changes in search_path. 2013-01-25 14:14:41 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Implement pg_unreachable() on MSVC. 2013-01-23 12:53:55 +02:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
miscadmin.h Make sure MaxBackends is always set 2013-01-02 14:39:11 -03:00
pg_config.h.in Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_config.h.win32 Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
port.h Use correct output device for Windows prompts. 2013-01-24 16:01:31 -05:00
postgres.h Improve concurrency of foreign key locking 2013-01-23 12:04:59 -03:00
postgres_ext.h Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
postgres_fe.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00