pageinspect's infomask and infomask2 as smallint

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pageinspect's infomask and infomask2 as smallint
Date: 2011-02-14 19:49:25
Message-ID: 1297712400-sup-2831@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks to Noah Misch's review of the keylock patch I noticed that
pageinspect's heap_page_items(bytea) function returns infomask and
infomask2 as smallint (signed). But the fields in the tuple header are
16 bits unsigned, so if the high (16th) bit is set, it returns negative
values which seem hard to handle. Not a problem for infomask, because
the high bit is used for a VACUUM FULL-era flag; but in infomask2 it is
used.

This seems hard to fix for existing installations with the unpackaged
module already loaded -- IIRC it's not acceptable to drop a function,
which is what would need to be done here.

I report this because it seems the first case to test upgradability of a
module.

--
Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2011-02-14 19:56:33 Re: CommitFest 2011-01 as of 2011-02-04
Previous Message Cédric Villemain 2011-02-14 19:31:45 Re: why two dashes in extension load files