Re: BUG #5906: assertion failure in AtCleanup_Portals
От | Tom Lane |
---|---|
Тема | Re: BUG #5906: assertion failure in AtCleanup_Portals |
Дата | |
Msg-id | 9890.1299171337@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #5906: assertion failure in AtCleanup_Portals (Itagaki Takahiro <itagaki.takahiro@gmail.com>) |
Ответы |
Re: BUG #5906: assertion failure in AtCleanup_Portals
|
Список | pgsql-bugs |
Itagaki Takahiro <itagaki.takahiro@gmail.com> writes: > On Thu, Mar 3, 2011 at 09:14, YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> wrote: >> here's a small test case. > I was able to reproduce the assertion failure. > It looks we call CreatePortal for ROLLBACK, but don't invoke > DropPortal nor AtAbort_Portals before AtCleanup_Portals. Hmm. The reason why not is that xact.c is already in TBLOCK_ABORT_END state, ie, it knows it already did AbortTransaction and doesn't see a need to do it again. So the portal running ROLLBACK doesn't get cleaned up by AtAbort_Portals. We could revert the addition of the "cleanup == NULL" assert in AtCleanup_Portals, but I'm still feeling that that assertion is a good thing. Maybe the cleanest fix is to have PortalRun do something to run the cleanup hook where it does this: /* Prevent portal's commands from being re-executed */ portal->status = PORTAL_DONE; That should be a safe-enough place to run cleanup. regards, tom lane
В списке pgsql-bugs по дате отправления: