From: | Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | GIN function of pageinspect has inconsistency data type. |
Date: | 2015-06-16 12:26:10 |
Message-ID: | CAD21AoC3MxL6Sg+GxtYuVZc=MWm5YFD+GCrXFuNrO3f_uDfGUA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
fix_pageinspect_inconsistency_data_type.patch | application/octet-stream | 3.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | John Lumby | 2015-06-16 13:21:50 | Re: RegisterBackgroundWorker does not actually start a bg worker process in 9.4.4 |
Previous Message | Bruce Momjian | 2015-06-16 11:47:47 | Re: 9.5 feature count |