From 0321d031b51f35567947e4a478b157293c4a38c6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 18 Aug 2010 15:22:00 +0000 Subject: 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. --- src/backend/nodes/outfuncs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/backend/nodes/outfuncs.c') diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index dba8d4b6690..48c0888499a 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.385 2010/03/30 21:58:10 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.385.4.1 2010/08/18 15:22:00 tgl Exp $ * * NOTES * Every node type that can appear in stored rules' parsetrees *must* @@ -244,6 +244,7 @@ _outPlannedStmt(StringInfo str, PlannedStmt *node) WRITE_ENUM_FIELD(commandType, CmdType); WRITE_BOOL_FIELD(hasReturning); WRITE_BOOL_FIELD(canSetTag); + WRITE_BOOL_FIELD(transientPlan); WRITE_NODE_FIELD(planTree); WRITE_NODE_FIELD(rtable); WRITE_NODE_FIELD(resultRelations); -- cgit v1.2.3