pgsql: Restore smgrtruncate() prototype in back-branches.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Restore smgrtruncate() prototype in back-branches.
Date: 2025-01-07 21:55:56
Message-ID: E1tVHYK-000Ows-Lj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Restore smgrtruncate() prototype in back-branches.

It's possible that external code is calling smgrtruncate(). Any
external callers might like to consider the recent changes to
RelationTruncate(), but commit 38c579b0 should not have changed the
function prototype in the back-branches, per ABI stability policy.

Restore smgrtruncate()'s traditional argument list in the back-branches,
but make it a wrapper for a new function smgrtruncate2(). The three
callers in core can use smgrtruncate2() directly. In master (18-to-be),
smgrtruncate2() is effectively renamed to smgrtruncate(), so this wart
is cleaned up.

Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/CA%2BhUKG%2BThae6x6%2BjmQiuALQBT2Ae1ChjMh1%3DkMvJ8y_SBJZrvA%40mail.gmail.com

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/66aaabe7a18f2bc5d22cd832ad612ba5bab18d7b

Modified Files
--------------
contrib/pg_visibility/pg_visibility.c | 2 +-
src/backend/catalog/storage.c | 4 ++--
src/backend/storage/smgr/smgr.c | 24 ++++++++++++++++++++++--
src/include/storage/smgr.h | 4 +++-
4 files changed, 28 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2025-01-07 21:56:03 pgsql: Restore smgrtruncate() prototype in back-branches.
Previous Message Nathan Bossart 2025-01-07 21:35:09 pgsql: Use PqMsg_* macros in postgres.c.