Re: [HACKERS] GIN pageinspect functions

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] GIN pageinspect functions
Date: 2023-11-25 03:03:22
Message-ID: ZWFj-lDu1hYfQgWb@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 10, 2015 at 09:14:48AM -0700, Jeff Janes wrote:
> When I call gin_leafpage_items on a {leaf} page, I get the ERROR:
>
> ERROR:  input page is not a compressed GIN data leaf page
> DETAIL:  Flags 0002, expected 0083
>
> I'm don't know why it won't work on an uncompressed leaf page (or for that
> matter, why my index pages are not compressed), but the docs should probably
> note the restriction.

Yes, this patch is from nine years ago, but it is still an improvement,
and the GIN page still must be compressed, so patch applied to master:

opaq = GinPageGetOpaque(page);
if (opaq->flags != (GIN_DATA | GIN_LEAF | GIN_COMPRESSED))
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("input page is not a compressed GIN data leaf page"),
errdetail("Flags %04X, expected %04X",
opaq->flags,
(GIN_DATA | GIN_LEAF | GIN_COMPRESSED))));

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2023-11-25 03:04:15 Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements
Previous Message vignesh C 2023-11-25 01:51:04 Re: pg_upgrade and logical replication