Move PG_TEMP_FILE* macros to file_utils.h.
authorNathan Bossart <nathan@postgresql.org>
Wed, 6 Sep 2023 00:02:06 +0000 (17:02 -0700)
committerNathan Bossart <nathan@postgresql.org>
Wed, 6 Sep 2023 00:02:06 +0000 (17:02 -0700)
commitf39b265808bde307953dd4bd46dca1f58f0988e8
tree142201a17026ae2a4bd65905e1012f68d68372cb
parent119c23eb9819213551cbe7e7665c8b493c59ceee
Move PG_TEMP_FILE* macros to file_utils.h.

Presently, frontend code that needs to use these macros must either
include storage/fd.h, which declares several frontend-unsafe
functions, or duplicate the macros.  This commit moves these macros
to common/file_utils.h, which is safe for both frontend and backend
code.  Consequently, we can also remove the duplicated macros in
pg_checksums and stop including storage/fd.h in pg_rewind.

Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/ZOP5qoUualu5xl2Z%40paquier.xyz
src/backend/backup/basebackup.c
src/backend/postmaster/postmaster.c
src/backend/storage/file/fileset.c
src/bin/pg_checksums/pg_checksums.c
src/bin/pg_rewind/filemap.c
src/include/common/file_utils.h
src/include/storage/fd.h