From 3ed19567198ddb34ab32be6ebdf132148287abdf Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 6 Sep 2023 16:26:39 -0700 Subject: 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 --- src/include/common/file_utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include/common/file_utils.h') diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h index dd1532bcb06..7da21f15e6e 100644 --- a/src/include/common/file_utils.h +++ b/src/include/common/file_utils.h @@ -24,6 +24,12 @@ typedef enum PGFileType PGFILETYPE_LNK } PGFileType; +typedef enum DataDirSyncMethod +{ + DATA_DIR_SYNC_METHOD_FSYNC, + DATA_DIR_SYNC_METHOD_SYNCFS +} DataDirSyncMethod; + struct iovec; /* avoid including port/pg_iovec.h here */ #ifdef FRONTEND -- cgit v1.2.3