Re: pgsql: Add functions to 'pageinspect' to inspect GiST indexes. - Mailing list pgsql-committers

From Peter Geoghegan
Subject Re: pgsql: Add functions to 'pageinspect' to inspect GiST indexes.
Date
Msg-id CAH2-WzngR7aDr+i8pdRWL-O+_VD+xJGxJvGhfhczvMJSpeM7ig@mail.gmail.com
Whole thread Raw
In response to pgsql: Add functions to 'pageinspect' to inspect GiST indexes.  (Heikki Linnakangas <heikki.linnakangas@iki.fi>)
Responses Re: pgsql: Add functions to 'pageinspect' to inspect GiST indexes.  (Andrey Borodin <x4mmm@yandex-team.ru>)
List pgsql-committers
On Wed, Jan 13, 2021 at 12:36 AM Heikki Linnakangas
<heikki.linnakangas@iki.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



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Remove dead code in ECPGconnect(), and improve documentation.
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Remove obsolete IndexBulkDeleteResult stats field.