Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 16AC36345AF for ; Fri, 5 Jun 2009 15:50:56 -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-08 for ; Fri, 5 Jun 2009 15:50:51 -0300 (ADT) Received: from cvs.postgresql.org (cvs.postgresql.org [217.196.146.206]) by mail.postgresql.org (Postfix) with ESMTP id 1B8DC633DF0 for ; Fri, 5 Jun 2009 15:50:54 -0300 (ADT) Received: by cvs.postgresql.org (Postfix, from userid 1007) id 060D075331E; Fri, 5 Jun 2009 18:50:53 +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: <20090605185053.060D075331E@cvs.postgresql.org> Date: Fri, 5 Jun 2009 18:50:53 +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/65 X-Sequence-Number: 37269 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_3_STABLE Modified Files: -------------- pgsql/src/include/access: gin.h (r1.16.2.2 -> r1.16.2.3) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/gin.h?r1=1.16.2.2&r2=1.16.2.3)