postgresql/contrib/pageinspect/expected
Michael Paquier be753639d3 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:02 +09:00
..
brin.out pageinspect: Fix crash with gist_page_items() 2023-03-02 14:03:02 +09:00
btree.out Add bt_multi_page_stats() function to contrib/pageinspect. 2023-01-02 13:02:29 -05:00
checksum.out Add an explicit test to catch changes in checksumming calculations. 2020-03-08 15:09:14 -04:00
checksum_1.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:08:03 +09:00
gist.out pageinspect: Fix crash with gist_page_items() 2023-03-02 14:03:02 +09:00
hash.out pageinspect: Fix handling of all-zero pages 2022-04-14 15:08:03 +09:00
oldextversions.out pageinspect: Improve page_header() for pages of 32kB 2021-07-12 11:05:27 +09:00
page.out Prevent instability in contrib/pageinspect's regression test. 2022-11-21 10:50:50 -05:00