diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-03 13:03:34 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-03-03 13:04:06 -0500 |
commit | 6252c4f9e201f619e5eebda12fa867acd4e4200e (patch) | |
tree | 7f6eaa38d85846e4e38593f2d2a7682807143e0a /src/backend/tcop/pquery.c | |
parent | 32fce70564999a90d48a27c4279a8908e90f3ece (diff) |
Run a portal's cleanup hook immediately when pushing it to DONE state.
This works around the problem noted by Yamamoto Takashi in bug #5906,
that there were code paths whereby we could reach AtCleanup_Portals
with a portal's cleanup hook still unexecuted. The changes I made
a few days ago were intended to prevent that from happening, and
I think that on balance it's still a good thing to avoid, so I don't
want to remove the Assert in AtCleanup_Portals. Hence do this instead.
Diffstat (limited to 'src/backend/tcop/pquery.c')
-rw-r--r-- | src/backend/tcop/pquery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index edde5642ee7..1286edee729 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -814,7 +814,7 @@ PortalRun(Portal portal, long count, bool isTopLevel, dest, altdest, completionTag); /* Prevent portal's commands from being re-executed */ - portal->status = PORTAL_DONE; + MarkPortalDone(portal); /* Always complete at end of RunMulti */ result = true; |