postgresql/contrib/pageinspect/expected
Michael Paquier 5ad63eee13 pageinspect: Fix crash with gist_page_items()
Attempting to use this function with a raw page not coming from a GiST
index would cause a crash, as it was missing the same sanity checks as
gist_page_items_bytea().  This slightly refactors the code so as all the
basic validation checks for GiST pages are done in a single routine,
in the same fashion as the pageinspect functions for hash and BRIN.

This fixes an issue similar to 076f4d9.  A test is added to stress for
this case.  While on it, I have added a similar test for
brin_page_items() with a combination make of a valid GiST index and a
raw btree page.  This one was already protected, but it was not tested.

Reported-by: Egor Chindyaskin
Author: Dmitry Koval
Discussion: https://postgr.es/m/17815-fc4a2d3b74705703@postgresql.org
Backpatch-through: 14
2023-03-02 14:03:21 +09:00
..
brin.out pageinspect: Fix crash with gist_page_items() 2023-03-02 14:03:21 +09:00
btree.out pageinspect: Fix handling of all-zero pages 2022-04-14 15:09:26 +09:00
checksum_1.out Add an explicit test to catch changes in checksumming calculations. 2020-03-08 15:09:14 -04:00
checksum.out Add an explicit test to catch changes in checksumming calculations. 2020-03-08 15:09:14 -04:00
gin.out pageinspect: Fix handling of all-zero pages 2022-04-14 15:09:26 +09:00
gist.out pageinspect: Fix crash with gist_page_items() 2023-03-02 14:03:21 +09:00
hash.out pageinspect: Fix handling of all-zero pages 2022-04-14 15:09:26 +09:00
oldextversions.out pageinspect: Change block number arguments to bigint 2021-01-19 11:03:38 +01:00
page.out Revert "Prevent instability in contrib/pageinspect's regression test." 2022-11-21 15:37:48 -05:00