summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavan Deolasee2015-05-06 11:42:51 +0000
committerPavan Deolasee2015-05-06 11:42:51 +0000
commit68421b15469855c1ace8c4a54faffcb0ff36d72d (patch)
treefe92078b0ca1d74dbf6ef0bdc005a072d41c29aa /src
parentbdcf083be809e550a9c0de68992b9d413a37192b (diff)
Don't revalidate plans for which raw parse tree is not stroed.
Right now only RemoteSubplan mechanism uses this
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/cache/plancache.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index cb37a74c3d..dc4cd86c42 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -629,6 +629,23 @@ RevalidateCachedQuery(CachedPlanSource *plansource)
return NIL;
}
+#ifdef XCP
+ /*
+ * In the raw_parse_tree is not available, there is no way the plan can be
+ * revalidated and there must not be any need to do so. Trust the existing
+ * plan
+ *
+ * XXX We should rather check this as an assertion, but currently
+ * RemoteSubplan gets invalidated because of search_path changes as temp
+ * namespace gets added in subsequent revalidation.
+ */
+ if (plansource->raw_parse_tree == NIL)
+ {
+ Assert(plansource->is_valid);
+ return NIL;
+ }
+#endif
+
/*
* If the query is currently valid, we should have a saved search_path ---
* check to see if that matches the current environment. If not, we want