Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id EC67FB5DC5A for ; Mon, 26 Sep 2011 21:44:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 61538-01-3 for ; Tue, 27 Sep 2011 00:44:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 8EAE1B5DBBD for ; Mon, 26 Sep 2011 21:43:49 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8R0hjtY007136; Mon, 26 Sep 2011 20:43:45 -0400 (EDT) To: Alvaro Herrera cc: yamt , pgsql-hackers Subject: Re: [BUGS] BUG #6218: TRAP: FailedAssertion( "!(owner->nsnapshots == 0)", File: "resowner.c", Line: 365) In-reply-to: <1317083058-sup-9596@alvh.no-ip.org> References: <5291.1316980809@sss.pgh.pa.us> <20110926100653.4D3BC14A143@mail.netbsd.org> <8244.1317054397@sss.pgh.pa.us> <1317070986-sup-4844@alvh.no-ip.org> <2126.1317073572@sss.pgh.pa.us> <6382.1317081585@sss.pgh.pa.us> <1317083058-sup-9596@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Mon, 26 Sep 2011 21:33:03 -0300" Date: Mon, 26 Sep 2011 20:43:45 -0400 Message-ID: <7135.1317084225@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/1432 X-Sequence-Number: 195621 Alvaro Herrera 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