pgsql: pageinspect: Fix failure with hash_bitmap_info() for partitioned - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: pageinspect: Fix failure with hash_bitmap_info() for partitioned
Date
Msg-id E1rFWGg-00Atwm-Mz@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
pageinspect: Fix failure with hash_bitmap_info() for partitioned indexes

This function reads directly a page from a relation, relying on
index_open() to open the index to read from.  Unfortunately, this would
crash when using partitioned indexes, as these can be opened with
index_open() but they have no physical pages.

Alexander has fixed the module, while I have written the test.

Author: Alexander Lakhin, Michael Paquier
Discussion: https://postgr.es/m/18246-f4d9ff7cb3af77e6@postgresql.org
Backpatch-through: 12

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/20847013642127e75ee4fe3ddb8228a1fb4b652f

Modified Files
--------------
contrib/pageinspect/expected/hash.out | 5 +++++
contrib/pageinspect/hashfuncs.c       | 6 ++++--
contrib/pageinspect/sql/hash.sql      | 5 +++++
3 files changed, 14 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: pgstattuple: Fix failure with pgstathashindex() for partitioned
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Simplify newNode() by removing special cases