pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move PG_TEMP_FILE* macros to file_utils.h.
Date: Wed, 06 Sep 2023 00:03:00 +0000
Message-ID: <E1qdg0a-002ae1-9k@gemulon.postgresql.org> (raw)

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

Branch
------
master

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

Modified Files
--------------
src/backend/backup/basebackup.c     |  2 +-
src/backend/postmaster/postmaster.c |  1 +
src/backend/storage/file/fileset.c  |  1 +
src/bin/pg_checksums/pg_checksums.c | 10 ----------
src/bin/pg_rewind/filemap.c         |  2 +-
src/include/common/file_utils.h     |  4 ++++
src/include/storage/fd.h            |  4 ----
7 files changed, 8 insertions(+), 16 deletions(-)



Message-ID: <E1qdg0a-002ae1-9k@gemulon.postgresql.org>
Permalink:  ../E1qdg0a-002ae1-9k@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qdg0a-002ae1-9k@gemulon.postgresql.org

 · 

reply

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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Move PG_TEMP_FILE* macros to file_utils.h.
  In-Reply-To: <E1qdg0a-002ae1-9k@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