Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bq9zl-000828-Up for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Oct 2016 02:25:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bq9zk-0005gz-By for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Oct 2016 02:25:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bq9yM-00045O-2b for pgsql-hackers@postgreSQL.org; Sat, 01 Oct 2016 02:24:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bq9yF-0000Kb-2n for pgsql-hackers@postgreSQL.org; Sat, 01 Oct 2016 02:24:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u912O8PO029044; Fri, 30 Sep 2016 22:24:09 -0400 From: Tom Lane To: Robert Haas cc: pgsql-hackers@postgreSQL.org Subject: contrib/pg_visibility craps out in assert-enabled builds Date: Fri, 30 Sep 2016 22:24:08 -0400 Message-ID: <29043.1475288648@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org So I tried using pg_visibility's pg_check_visible() as part of testing the business with pg_upgrade generating faulty visibility maps on bigendian servers, and it instantly generated an assert failure here: #2 0x0041de78 in ExceptionalCondition (conditionName=, errorType=, fileName=, lineNumber=) at assert.c:54 #3 0x0045c410 in HeapTupleSatisfiesVacuum (htup=0x0, OldestXmin=9170, buffer=2958) at tqual.c:1169 #4 0x00a41c3c in tuple_all_visible (tup=0xbfffd8e4, OldestXmin=9170, buffer=) at pg_visibility.c:719 #5 0x00a420a8 in collect_corrupt_items (relid=46802, all_visible=, all_frozen=) at pg_visibility.c:630 #6 0x00a4262c in pg_check_visible (fcinfo=0x104b704) at pg_visibility.c:328 The problem seems to be that HeapTupleSatisfiesVacuum asserts Assert(ItemPointerIsValid(&htup->t_self)); while collect_corrupt_items hasn't bothered to set up the t_self field of the HeapTupleData it's passing in. This would imply that you never tested this code in an assert-enabled build, which I find surprising. Am I missing something? (I'm not really sure *why* HeapTupleSatisfiesVacuum contains this Assert, because it doesn't do anything with t_self, but nonetheless the Assert has been there for several years. Seems to have been inserted by you, in fact.) regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers