diff options
| author | Nathan Bossart | 2023-10-13 20:16:45 +0000 |
|---|---|---|
| committer | Nathan Bossart | 2023-10-13 20:16:45 +0000 |
| commit | 8d140c58229d6224882f881d9b62ba06236e71d3 (patch) | |
| tree | 97c6f71d2fd795dfa42446b505b7c43ff145243f /src/backend/utils | |
| parent | c5a032e518acc259d31d5e7bd85acdea3b4e9c93 (diff) | |
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
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/misc/guc_tables.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 16ec6c5ef02..4c585741661 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -485,7 +485,7 @@ static const struct config_enum_entry wal_compression_options[] = { extern const struct config_enum_entry wal_level_options[]; extern const struct config_enum_entry archive_mode_options[]; extern const struct config_enum_entry recovery_target_action_options[]; -extern const struct config_enum_entry sync_method_options[]; +extern const struct config_enum_entry wal_sync_method_options[]; extern const struct config_enum_entry dynamic_shared_memory_options[]; /* @@ -4843,9 +4843,9 @@ struct config_enum ConfigureNamesEnum[] = gettext_noop("Selects the method used for forcing WAL updates to disk."), NULL }, - &sync_method, - DEFAULT_SYNC_METHOD, sync_method_options, - NULL, assign_xlog_sync_method, NULL + &wal_sync_method, + DEFAULT_WAL_SYNC_METHOD, wal_sync_method_options, + NULL, assign_wal_sync_method, NULL }, { |
