diff options
Diffstat (limited to 'src/bin/pg_resetwal/pg_resetwal.c')
-rw-r--r-- | src/bin/pg_resetwal/pg_resetwal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index eba7c5fdee0..bdf71886ee2 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -52,6 +52,7 @@ #include "catalog/catversion.h" #include "catalog/pg_control.h" #include "common/fe_memutils.h" +#include "common/file_perm.h" #include "common/restricted_token.h" #include "storage/large_object.h" #include "pg_getopt.h" @@ -967,7 +968,7 @@ RewriteControlFile(void) fd = open(XLOG_CONTROL_FILE, O_RDWR | O_CREAT | O_EXCL | PG_BINARY, - S_IRUSR | S_IWUSR); + pg_file_create_mode); if (fd < 0) { fprintf(stderr, _("%s: could not create pg_control file: %s\n"), @@ -1249,7 +1250,7 @@ WriteEmptyXLOG(void) unlink(path); fd = open(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY, - S_IRUSR | S_IWUSR); + pg_file_create_mode); if (fd < 0) { fprintf(stderr, _("%s: could not open file \"%s\": %s\n"), |