pgsql: Refactor code checking for file existence - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Refactor code checking for file existence
Date
Msg-id E1rO7rc-0010x6-TK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Add support event triggers on authenticated login
Next
From: Michael Paquier
Date:
Subject: pgsql: Fix pg_walsummary's .gitignore