pgsql: Change _mdfd_segpath() to return paths by value

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Change _mdfd_segpath() to return paths by value
Date: 2025-02-25 14:23:30
Message-ID: E1tmvqL-0001EN-0Q@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Change _mdfd_segpath() to return paths by value

This basically mirrors the changes done in the predecessor commit. While there
isn't currently a need to get these paths in critical sections, it seems a
shame to unnecessarily allocate memory in these paths now that relpath()
doesn't allocate anymore.

Discussion: https://postgr.es/m/xeri5mla4b5syjd5a25nok5iez2kr3bm26j2qn4u7okzof2bmf@kwdh2vf7npra

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ecbff4378beecb0b1d12fc758538005a69821db1

Modified Files
--------------
src/backend/storage/smgr/md.c | 58 +++++++++++++++++++++++++---------------
src/tools/pgindent/typedefs.list | 1 +
2 files changed, 38 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2025-02-26 00:17:03 pgsql: Remove redundant pg_set_*_stats() variants.
Previous Message Peter Eisentraut 2025-02-25 13:28:07 pgsql: Remove obsolete Python version check