From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve the naming in wal_sync_method code.
Date: Fri, 13 Oct 2023 20:17:55 +0000
Message-ID: <E1qrOba-000P08-NA@gemulon.postgresql.org> (raw)
Improve the naming in wal_sync_method code.
* sync_method is renamed to wal_sync_method.
* sync_method_options[] is renamed to wal_sync_method_options[].
* assign_xlog_sync_method() is renamed to assign_wal_sync_method().
* The names of the available synchronization methods are now
prefixed with "WAL_SYNC_METHOD_" and have been moved into a
WalSyncMethod enum.
* PLATFORM_DEFAULT_SYNC_METHOD is renamed to
PLATFORM_DEFAULT_WAL_SYNC_METHOD, and DEFAULT_SYNC_METHOD is
renamed to DEFAULT_WAL_SYNC_METHOD.
These more descriptive names help distinguish the code for
wal_sync_method from the code for DataDirSyncMethod (e.g., the
recovery_init_sync_method configuration parameter and the
--sync-method option provided by several frontend utilities). This
change also prevents name collisions between the aforementioned
sets of code. Since this only improves the naming of internal
identifiers, there should be no behavior change.
Author: Maxim Orlov
Discussion: https://postgr.es/m/CACG%3DezbL1gwE7_K7sr9uqaCGkWhmvRTcTEnm3%2BX1xsRNwbXULQ%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8d140c58229d6224882f881d9b62ba06236e71d3
Modified Files
--------------
src/backend/access/transam/xlog.c | 58 ++++++++++++++++++-------------------
src/backend/storage/file/fd.c | 4 +--
src/backend/utils/misc/guc_tables.c | 8 ++---
src/include/access/xlog.h | 15 ++++++----
src/include/access/xlogdefs.h | 8 ++---
src/include/port/freebsd.h | 2 +-
src/include/port/linux.h | 2 +-
src/include/utils/guc_hooks.h | 2 +-
src/tools/pgindent/typedefs.list | 1 +
9 files changed, 52 insertions(+), 48 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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Improve the naming in wal_sync_method code.
In-Reply-To: <E1qrOba-000P08-NA@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