]> granicus.if.org Git - postgresql/commit
Run a portal's cleanup hook immediately when pushing it to DONE state.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Mar 2011 18:03:34 +0000 (13:03 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Mar 2011 18:04:06 +0000 (13:04 -0500)
commit6252c4f9e201f619e5eebda12fa867acd4e4200e
tree7f6eaa38d85846e4e38593f2d2a7682807143e0a
parent32fce70564999a90d48a27c4279a8908e90f3ece
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.
src/backend/tcop/pquery.c
src/backend/utils/mmgr/portalmem.c
src/include/utils/portal.h