Re: contrib/pg_visibility craps out in assert-enabled builds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: contrib/pg_visibility craps out in assert-enabled builds
Date: 2016-10-03 19:33:09
Message-ID: 10788.1475523189@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Sep 30, 2016 at 10:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 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?

> My standard build script uses --enable-cassert, so I doubt that's the
> case. It's more likely that on my system it just happened to find
> some non-zero garbage at that point on the stack that made it not fail
> the assertion.

Yeah, after I looked closer at what the Assert is actually testing,
I realized it was just blind luck that I'd managed to see it fail.
It's a pretty weak test :-(. Anyway, fixed now.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2016-10-03 19:33:22 Re: [COMMITTERS] pgsql: Copy-editing for contrib/pg_visibility documentation.
Previous Message Vitaly Burovoy 2016-10-03 19:27:39 Re: Proposal: ON UPDATE REMOVE foreign key action