diff options
author | Nathan Bossart <nathan@postgresql.org> | 2023-09-06 16:26:39 -0700 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2023-09-06 16:26:39 -0700 |
commit | 3ed19567198ddb34ab32be6ebdf132148287abdf (patch) | |
tree | a8c08ec4456898b7a21f935c9ea9ed91dc050066 /src/backend/utils/misc/guc_tables.c | |
parent | 059e4ee92108c0ecc01cb44a9cd1f00042271f7f (diff) | |
download | postgresql-3ed19567198ddb34ab32be6ebdf132148287abdf.tar.gz postgresql-3ed19567198ddb34ab32be6ebdf132148287abdf.zip |
Make enum for sync methods available to frontend code.
This commit renames RecoveryInitSyncMethod to DataDirSyncMethod and
moves it to common/file_utils.h. This is preparatory work for a
follow-up commit that will allow specifying the synchronization
method in frontend utilities such as pg_upgrade and pg_basebackup.
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/ZN2ZB4afQ2JbR9TA%40paquier.xyz
Diffstat (limited to 'src/backend/utils/misc/guc_tables.c')
-rw-r--r-- | src/backend/utils/misc/guc_tables.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 4107d0a7355..bdb26e2b77d 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -41,6 +41,7 @@ #include "commands/trigger.h" #include "commands/user.h" #include "commands/vacuum.h" +#include "common/file_utils.h" #include "common/scram-common.h" #include "jit/jit.h" #include "libpq/auth.h" @@ -430,9 +431,9 @@ StaticAssertDecl(lengthof(ssl_protocol_versions_info) == (PG_TLS1_3_VERSION + 2) "array length mismatch"); static const struct config_enum_entry recovery_init_sync_method_options[] = { - {"fsync", RECOVERY_INIT_SYNC_METHOD_FSYNC, false}, + {"fsync", DATA_DIR_SYNC_METHOD_FSYNC, false}, #ifdef HAVE_SYNCFS - {"syncfs", RECOVERY_INIT_SYNC_METHOD_SYNCFS, false}, + {"syncfs", DATA_DIR_SYNC_METHOD_SYNCFS, false}, #endif {NULL, 0, false} }; @@ -4953,7 +4954,7 @@ struct config_enum ConfigureNamesEnum[] = gettext_noop("Sets the method for synchronizing the data directory before crash recovery."), }, &recovery_init_sync_method, - RECOVERY_INIT_SYNC_METHOD_FSYNC, recovery_init_sync_method_options, + DATA_DIR_SYNC_METHOD_FSYNC, recovery_init_sync_method_options, NULL, NULL, NULL }, |