Re: pgsql: Add functions to 'pageinspect' to inspect GiST indexes.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: pgsql: Add functions to 'pageinspect' to inspect GiST indexes.
Date: 2021-02-11 20:53:30
Message-ID: CAH2-WzngR7aDr+i8pdRWL-O+_VD+xJGxJvGhfhczvMJSpeM7ig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Jan 13, 2021 at 12:36 AM Heikki Linnakangas
<heikki(dot)linnakangas(at)iki(dot)fi> wrote:
> Add functions to 'pageinspect' to inspect GiST indexes.

Is gist_page_items() robust with deleted pages? I think that it's
unsafe to assume that deleted pages will have index tuples, since the
page contents will actually be a GISTDeletedPageContents.

Simplest fix would be to assume maxoff is 0 for the page, perhaps.
Right now we just use PageGetMaxOffsetNumber(), which implicitly
assumes that the page uses slotted tuples with an array of line
pointers (actually it can also deal with a zeroed page, but that's not
relevant here).

--
Peter Geoghegan

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-02-11 21:03:55 Re: Detecting pointer misalignment (was Re: pgsql: Implementation of subscripting for jsonb)
Previous Message Tom Lane 2021-02-11 20:06:03 pgsql: Remove dead code in ECPGconnect(), and improve documentation.