Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id BDE2B63483E for ; Fri, 5 Jun 2009 15:51:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 12832-09 for ; Fri, 5 Jun 2009 15:51:00 -0300 (ADT) Received: from cvs.postgresql.org (cvs.postgresql.org [217.196.146.206]) by mail.postgresql.org (Postfix) with ESMTP id 1FF006345E4 for ; Fri, 5 Jun 2009 15:51:00 -0300 (ADT) Received: by cvs.postgresql.org (Postfix, from userid 1007) id 19ABD75331E; Fri, 5 Jun 2009 18:50:59 +0000 (UTC) MIME-Version: 1.0 To: pgsql-committers@postgresql.org Subject: pgsql: GIN's ItemPointerIsMin, ItemPointerIsMax, and X-Mailer: activitymail 1.24, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain Message-Id: <20090605185059.19ABD75331E@cvs.postgresql.org> Date: Fri, 5 Jun 2009 18:50:59 +0000 (UTC) From: tgl@postgresql.org (Tom Lane) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/66 X-Sequence-Number: 37270 Log Message: ----------- GIN's ItemPointerIsMin, ItemPointerIsMax, and ItemPointerIsLossyPage macros should use GinItemPointerGetBlockNumber/GinItemPointerGetOffsetNumber, not ItemPointerGetBlockNumber/ItemPointerGetOffsetNumber, because the latter will Assert() on ip_posid == 0, ie a "Min" pointer. (Thus, ItemPointerIsMin has never worked at all, but it seems unused at present.) I'm not certain that the case can occur in normal functioning, but it's blowing up on me while investigating Tatsuo-san's data corruption problem. In any case it seems like a problem waiting to bite someone. Back-patch just in case this really is a problem for somebody in the field. Tags: ---- REL8_2_STABLE Modified Files: -------------- pgsql/src/include/access: gin.h (r1.9.2.3 -> r1.9.2.4) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gin.h?r1=1.9.2.3&r2=1.9.2.4)