Use relation_close() more consistently in contrib/ All the code paths updated here have been using index_close() to close a relation that was opened with relation_open(), in pgstattuple and pageinspect. index_close() does the same thing as relation_close(), so there is no harm, but being inconsistent could lead to issues if the internals of these close() functions begin to introduce some specific logic in the future.
In passing, this commit adds some comments explaining why we are using relation_open() instead of index_open() in a few places, which is due to the fact that partitioned indexes are not allowed in these functions. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Japin Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/8b9b93e39b10ce32577eca3c84face880fc8aff0 Modified Files -------------- contrib/pageinspect/hashfuncs.c | 6 +++++- contrib/pgstattuple/pgstatindex.c | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-)
