From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor code checking for file existence
Date: Fri, 12 Jan 2024 03:05:44 +0000
Message-ID: <E1rO7rc-0010x6-TK@gemulon.postgresql.org> (raw)
Refactor code checking for file existence
jit.c and dfgr.c had a copy of the same code to check if a file exists
or not, with a twist: jit.c did not check for EACCES when failing the
stat() call for the path whose existence is tested. This refactored
routine will be used by an upcoming patch.
Reviewed-by: Ashutosh Bapat
Discussion: https://postgr.es/m/ZTiV8tn_MIb_H2rE@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e72a37528ddaadd796be73fe9b0a0c08b18476d2
Modified Files
--------------
src/backend/jit/jit.c | 20 +-------------------
src/backend/storage/file/fd.c | 23 +++++++++++++++++++++++
src/backend/utils/fmgr/dfmgr.c | 25 ++++---------------------
src/include/storage/fd.h | 1 +
4 files changed, 29 insertions(+), 40 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor code checking for file existence
In-Reply-To: <E1rO7rc-0010x6-TK@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox