Skip to content

Commit e9f5a06

Browse files
committed
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
1 parent 0b8ea70 commit e9f5a06

File tree

1 file changed

+2
-2
lines changed
  • src/backend/access/transam

1 file changed

+2
-2
lines changed

src/backend/access/transam/xlog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -5484,7 +5484,7 @@ readRecoverySignalFile(void)
54845484
{
54855485
int fd;
54865486

5487-
fd = BasicOpenFilePerm(STANDBY_SIGNAL_FILE, O_RDWR | PG_BINARY | get_sync_bit(sync_method),
5487+
fd = BasicOpenFilePerm(STANDBY_SIGNAL_FILE, O_RDWR | PG_BINARY,
54885488
S_IRUSR | S_IWUSR);
54895489
if (fd >= 0)
54905490
{
@@ -5497,7 +5497,7 @@ readRecoverySignalFile(void)
54975497
{
54985498
int fd;
54995499

5500-
fd = BasicOpenFilePerm(RECOVERY_SIGNAL_FILE, O_RDWR | PG_BINARY | get_sync_bit(sync_method),
5500+
fd = BasicOpenFilePerm(RECOVERY_SIGNAL_FILE, O_RDWR | PG_BINARY,
55015501
S_IRUSR | S_IWUSR);
55025502
if (fd >= 0)
55035503
{

0 commit comments

Comments
 (0)