Re: [BUGS] BUG #6218: TRAP: FailedAssertion( "!(owner->nsnapshots == 0)", File: "resowner.c", Line: 365) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUGS] BUG #6218: TRAP: FailedAssertion( "!(owner->nsnapshots == 0)", File: "resowner.c", Line: 365)
Date
Msg-id 7135.1317084225@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #6218: TRAP: FailedAssertion( "!(owner->nsnapshots == 0)", File: "resowner.c", Line: 365)  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> To be honest, I panicked for a second when I saw the new
> SnapshotResetXmin call, before I realized that it wasn't necessary
> before.  The serializable case makes more sense the patched way, I
> think.

Yeah, in the old coding, SnapshotResetXmin would have happened
implicitly at the last UnregisterSnapshot call.  In this arrangement,
the "last UnregisterSnapshot" is going to be the manual one in
AtEOXact_Snapshot, so we need a manual SnapshotResetXmin there too.
I chose to put it at the bottom of the routine so that it's guaranteed
to fire even if the RegisteredSnapshots count was corrupted, but that's
just paranoia.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] BUG #6218: TRAP: FailedAssertion( "!(owner->nsnapshots == 0)", File: "resowner.c", Line: 365)
Next
From: Fujii Masao
Date:
Subject: Re: bug of recovery?