GIN function of pageinspect has inconsistency data type. - Mailing list pgsql-hackers

From Sawada Masahiko
Subject GIN function of pageinspect has inconsistency data type.
Date
Msg-id CAD21AoC3MxL6Sg+GxtYuVZc=MWm5YFD+GCrXFuNrO3f_uDfGUA@mail.gmail.com
Whole thread Raw
Responses Re: GIN function of pageinspect has inconsistency data type.  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
Hi all,

I noticed while using gin function of pageinspect that there are some
inconsistency data types.
For example, data type of GinMetaPageData.head, and tail  is
BlockNumber, i.g, uint32.
But in ginfunc.c, we get that value as int64.

So I think the output is odd a little. Is it intentional?

- Before
postgres(1)=# select pending_head, pending_tail from
gin_metapage_info(get_raw_page('trgm_idx'::text, 0));
 pending_head | pending_tail
--------------------+--------------
   4294967295  |   4294967295
(1 row)

- After attaching patch
postgres(1)=# select pending_head, pending_tail from
gin_metapage_info(get_raw_page('trgm_idx'::text, 0));
 pending_head | pending_tail
--------------------+------------------
           -1           |           -1

There are some similar cases except above, so the fixing patch around
ginfunc.c is attached.

Regards,

-------
Sawada Masahiko

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 9.5 feature count
Next
From: kjsteuer
Date:
Subject: Re: Function to get size of notification queue?