pageinspect: use index_close() for GiST index relation
authorMichael Paquier <[email protected]>
Mon, 15 Dec 2025 01:28:28 +0000 (10:28 +0900)
committerMichael Paquier <[email protected]>
Mon, 15 Dec 2025 01:28:28 +0000 (10:28 +0900)
gist_page_items() opens its target relation with index_open(), but
closed it using relation_close() instead of index_close().  This was
harmless because index_close() and relation_close() do the exact same
work, still inconsistent with the rest of the code tree as routines
opening and closing a relation based on a relkind are expected to match,
at least in name.

Author: Chao Li <[email protected]>
Discussion: https://postgr.es/m/CAEoWx2=bL41WWcD-4Fxx-buS2Y2G5=9PjkxZbHeFMR6Uy2WNvw@mail.gmail.com

contrib/pageinspect/gistfuncs.c

index de3746a156b68a156cded3bcac1fd388d7ef7741..414513c395b6a7830d3fe2bec4fa3d5f06a2744f 100644 (file)
@@ -361,7 +361,7 @@ gist_page_items(PG_FUNCTION_ARGS)
        tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
    }
 
-   relation_close(indexRel, AccessShareLock);
+   index_close(indexRel, AccessShareLock);
 
    return (Datum) 0;
 }