aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-08-18 15:22:09 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-08-18 15:22:09 +0000
commit8a288694f52d3f8a717ca7f1aa19a56b11e19232 (patch)
tree2abb0d54e1dc90f8ad064408b9d1d042dbb6a85e /src
parentb9b65b7417595286fc6932bfe1144ebcf7d0e3bc (diff)
downloadpostgresql-8a288694f52d3f8a717ca7f1aa19a56b11e19232.tar.gz
postgresql-8a288694f52d3f8a717ca7f1aa19a56b11e19232.zip
Add missing handling of PlannedStmt.transientPlan in copyfuncs/outfuncs.
_outPlannedStmt is only debug support, so the omission there was not very serious, but the omission in _copyPlannedStmt is a real bug. The consequence would be that a copied plan tree would never be marked as a transient plan, so that we would forget we ought to replan it after some not-yet-ready index becomes ready for use. This might explain some past complaints about indexes created with CREATE INDEX CONCURRENTLY not being used right away. Problem spotted by Yeb Havinga. Back-patch to 8.3, where the field was added.
Diffstat (limited to 'src')
-rw-r--r--src/backend/nodes/copyfuncs.c3
-rw-r--r--src/backend/nodes/outfuncs.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index fbf254ad8a1..ad9b555ba30 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.432.2.1 2009/10/06 00:55:34 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.432.2.2 2010/08/18 15:22:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -78,6 +78,7 @@ _copyPlannedStmt(PlannedStmt *from)
COPY_SCALAR_FIELD(commandType);
COPY_SCALAR_FIELD(canSetTag);
+ COPY_SCALAR_FIELD(transientPlan);
COPY_NODE_FIELD(planTree);
COPY_NODE_FIELD(rtable);
COPY_NODE_FIELD(resultRelations);
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 78cab4f534a..675db4dba97 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.360.2.2 2010/03/30 21:58:18 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.360.2.3 2010/08/18 15:22:09 tgl Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -243,6 +243,7 @@ _outPlannedStmt(StringInfo str, PlannedStmt *node)
WRITE_ENUM_FIELD(commandType, CmdType);
WRITE_BOOL_FIELD(canSetTag);
+ WRITE_BOOL_FIELD(transientPlan);
WRITE_NODE_FIELD(planTree);
WRITE_NODE_FIELD(rtable);
WRITE_NODE_FIELD(resultRelations);