Re: [HACKERS] GIN pageinspect functions

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] GIN pageinspect functions
Дата
Msg-id ZWFj-lDu1hYfQgWb@momjian.us
обсуждение исходный текст
Ответ на Re: GIN pageinspect functions  (Jeff Janes <jeff.janes@gmail.com>)
Список 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@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: pg_upgrade and logical replication
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements