Re: new heapcheck contrib module - Mailing list pgsql-hackers

From Tom Lane
Subject Re: new heapcheck contrib module
Date
Msg-id 66594.1603401799@sss.pgh.pa.us
Whole thread Raw
In response to Re: new heapcheck contrib module  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes:
> Yeah, I'm already looking at that.  The logic in verify_heapam skips over line pointers that are unused or dead, and
thetest is reporting zero corruption (and complaining about that), so it's probably not going to help to overwrite all
theline pointers with this particular bit pattern any more than to just overwrite the first one, as it would just skip
themall. 

> I think the test should overwrite the line pointers with a variety of different bit patterns, or one calculated to
workon all platforms.  I'll have to write that up. 

What we need here is to produce the same test results on either
endianness.  So probably the thing to do is apply the equivalent
of ntohl() to produce a string that looks right for either host
endianness.  As a separate matter, you'd want to test corruption
producing any of the four flag bitpatterns, probably.

It says here you can use Perl's pack/unpack functions to get
the equivalent of ntohl(), but I've not troubled to work out how.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: new heapcheck contrib module
Next
From: Peter Geoghegan
Date:
Subject: Re: new heapcheck contrib module