aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-08-13 16:27:28 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-08-13 16:27:28 +0000
commitdd56a9d6ededebc25e8f57f9d3a58e1b94f42a81 (patch)
tree06b9e8db4de021f697d056045feb69641f3c2fce /src/backend/utils/cache
parent86003b80cb05b7e15966d48c65ecba02348e7e57 (diff)
downloadpostgresql-dd56a9d6ededebc25e8f57f9d3a58e1b94f42a81.tar.gz
postgresql-dd56a9d6ededebc25e8f57f9d3a58e1b94f42a81.zip
Fix Assert failure in PushOverrideSearchPath when trying to restore a search
path that specifies useTemp, but there is no active temp schema in the current session. (This can happen if the path was saved during a transaction that created a temp schema and was later rolled back.) For existing callers it's sufficient to ignore the useTemp flag in this case, though we might later want to offer an option to create a fresh temp schema. So far as I can tell this is just an Assert failure: in a non-assert build, the code would push a zero onto the new search path, which is useless but not very harmful. Per bug report from Heikki. Back-patch to 8.3; prior versions don't have this code.
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r--src/backend/utils/cache/plancache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index 3b22f406132..6c3082d34fc 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -35,7 +35,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.27.2.2 2010/01/13 16:57:03 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.27.2.3 2010/08/13 16:27:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -470,6 +470,8 @@ RevalidateCachedPlan(CachedPlanSource *plansource, bool useResOwner)
/*
* Restore the search_path that was in use when the plan was made.
+ * See comments for PushOverrideSearchPath about limitations of this.
+ *
* (XXX is there anything else we really need to restore?)
*/
PushOverrideSearchPath(plansource->search_path);