Add missing handling of PlannedStmt.transientPlan in copyfuncs/outfuncs.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Aug 2010 15:22:09 +0000 (15:22 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 18 Aug 2010 15:22:09 +0000 (15:22 +0000)
commit8a288694f52d3f8a717ca7f1aa19a56b11e19232
tree2abb0d54e1dc90f8ad064408b9d1d042dbb6a85e
parentb9b65b7417595286fc6932bfe1144ebcf7d0e3bc
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/copyfuncs.c
src/backend/nodes/outfuncs.c