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  <br...@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.


Reply via email to