From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
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> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
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=<value temporarily unavailable, due to optimizations>, errorType=<value temporarily unavailable, due to optimizations>, fileName=<value temporarily unavailable, due to optimizations>, lineNumber=<value temporarily unavailable, due to optimizations>) 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=<value temporarily unavailable, due to optimizations>) at pg_visibility.c:719
#5 0x00a420a8 in collect_corrupt_items (relid=46802, all_visible=<value temporarily unavailable, due to optimizations>, all_frozen=<value temporarily unavailable, due to optimizations>) 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com
Subject: Re: contrib/pg_visibility craps out in assert-enabled builds
In-Reply-To: <29043.1475288648@sss.pgh.pa.us>
References: <29043.1475288648@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox