--- src/backend/storage/file/fd.c 2025-05-06 04:28:35.000000000 +0800 +++ src/backend/storage/file/fd.c 2025-07-30 06:43:30.000000000 +0800 @@ -111,6 +111,10 @@ #define PG_FLUSH_DATA_WORKS 1 #endif +#ifndef O_DSYNC +#define O_DSYNC 0 +#endif + /* * We must leave some file descriptors free for system(), the dynamic loader, * and other code that tries to open files without consulting fd.c. This