From: Tom Lane <tgl@sss.pgh.pa.us>
To: Itagaki Takahiro <itagaki.takahiro@gmail.com>
Cc: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5906: assertion failure in AtCleanup_Portals
Date: Thu, 03 Mar 2011 11:55:37 -0500
Message-ID: <9890.1299171337@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTi=PisvmjhrE2oxJQN1G+g8Sg9fSe_Gg==HHpbES@mail.gmail.com>
References: <16798.1299078556@sss.pgh.pa.us>
<20110303001403.11CB319CEB6@mail.netbsd.org>
<AANLkTi=PisvmjhrE2oxJQN1G+g8Sg9fSe_Gg==HHpbES@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, itagaki.takahiro@gmail.com, yamt@mwd.biglobe.ne.jp
Subject: Re: BUG #5906: assertion failure in AtCleanup_Portals
In-Reply-To: <9890.1299171337@sss.pgh.pa.us>
References: <16798.1299078556@sss.pgh.pa.us> <20110303001403.11CB319CEB6@mail.netbsd.org> <AANLkTi=PisvmjhrE2oxJQN1G+g8Sg9fSe_Gg==HHpbES@mail.gmail.com> <9890.1299171337@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox