pgsql: Use table/index_close() more consistently

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use table/index_close() more consistently
Date: 2025-12-18 22:56:19
Message-ID: E1vWMuw-001Uya-1v@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use table/index_close() more consistently

All the code paths updated here have been using relation_close() to
close a relation that has already been opened with table_open() or
index_open(), where a relkind check is enforced.

table_close() and index_open() do the same thing as relation_close(), so
there was no harm, but being inconsistent could lead to issues if the
internals of these close() functions begin to introduce some logic
specific to each relkind in the future.

Author: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Discussion: https://postgr.es/m/aUKamYGiDKO6byp5@ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d0f7996e58c2a92efe06c901c6dfe1f6ced0a1d

Modified Files
--------------
src/backend/access/brin/brin.c | 8 ++++----
src/backend/parser/parse_utilcmd.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2025-12-19 03:10:11 pgsql: Add guard to prevent recursive memory context logging.
Previous Message Noah Misch 2025-12-18 18:25:51 pgsql: Sort DO_SUBSCRIPTION_REL dump objects independent of OIDs.