diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-14 15:37:55 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-07-14 15:37:55 +0000 |
commit | 1aef7f8c2668f891a6b695633d2d3a2ea8487291 (patch) | |
tree | 16b1976dd0d8893dad698e56f3ff19b82341830f /src/backend/utils/adt/tsquery_rewrite.c | |
parent | 18efafdc3949641ade868de8f4d6771f3d2f99bb (diff) | |
download | postgresql-1aef7f8c2668f891a6b695633d2d3a2ea8487291.tar.gz postgresql-1aef7f8c2668f891a6b695633d2d3a2ea8487291.zip |
Do a conditional SPI_push/SPI_pop when replanning a query in
RevalidateCachedPlan. This is to avoid a "SPI_ERROR_CONNECT" failure when
the planner calls a SPI-using function and we are already inside one.
The alternative fix is to expect callers of RevalidateCachedPlan to do this,
which seems likely to result in additional hard-to-detect bugs of omission.
Per reports from Frank van Vugt and Marek Lewczuk.
Back-patch to 8.3. It's much harder to trigger the bug in 8.3, due to a
smaller set of cases in which plans can be invalidated, but it could happen.
(I think perhaps only a SI reset event could make 8.3 fail here, but that's
certainly within the realm of possibility.)
Diffstat (limited to 'src/backend/utils/adt/tsquery_rewrite.c')
0 files changed, 0 insertions, 0 deletions