diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-07-31 09:36:11 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2021-07-31 09:36:11 +0300 |
commit | e9f5a0681cb9cf74b4c1c98e10182ccce04aa08c (patch) | |
tree | 8a9aaccc6e840a035ba0f24c28cce313a106e9fb /src/backend/access/transam/xlog.c | |
parent | 0b8ea707580640f9d5562de77f4b563fa9131547 (diff) | |
download | postgresql-e9f5a0681cb9cf74b4c1c98e10182ccce04aa08c.tar.gz postgresql-e9f5a0681cb9cf74b4c1c98e10182ccce04aa08c.zip |
Don't use O_SYNC or similar when opening signal file to fsync it.
No need to use get_sync_bit() when we're calling pg_fsync() on the file.
We're not writing to the files, so it doesn't make any difference in
practice, but seems less surprising this way.
Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/b3b71061-4919-e882-4857-27e370ab134a%40iki.fi
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 26fa2b6c8f3..8461c88b6bb 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5484,7 +5484,7 @@ readRecoverySignalFile(void) { int fd; - fd = BasicOpenFilePerm(STANDBY_SIGNAL_FILE, O_RDWR | PG_BINARY | get_sync_bit(sync_method), + fd = BasicOpenFilePerm(STANDBY_SIGNAL_FILE, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR); if (fd >= 0) { @@ -5497,7 +5497,7 @@ readRecoverySignalFile(void) { int fd; - fd = BasicOpenFilePerm(RECOVERY_SIGNAL_FILE, O_RDWR | PG_BINARY | get_sync_bit(sync_method), + fd = BasicOpenFilePerm(RECOVERY_SIGNAL_FILE, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR); if (fd >= 0) { |