pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove O_FSYNC and associated macros.
Date: Fri, 22 Jul 2022 00:42:42 +0000
Message-ID: <E1oEgkb-000ebn-4F@gemulon.postgresql.org> (raw)

Remove O_FSYNC and associated macros.

O_FSYNC was a pre-POSIX way of spelling O_SYNC, supported since commit
9d645fd84c3 for non-conforming operating systems of the time.  It's not
needed on any modern system.  We can just use standard O_SYNC directly
if it exists (= all targeted systems except Windows), and get rid of our
OPEN_SYNC_FLAG macro.

Similarly for standard O_DSYNC, we can just use that directly if it
exists (= all targeted systems except DragonFlyBSD), and get rid of our
OPEN_DATASYNC_FLAG macro.

We still avoid choosing open_datasync as a default value for
wal_sync_method if O_DSYNC has the same value as O_SYNC (= only
OpenBSD), so there is no change in default behavior.

Discussion: https://postgr.es/m/CA%2BhUKGJE7y92NY7FG2ftUbZUaqohBU65_Ys_7xF5mUHo4wirTQ%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a1b56090eb54544b8ae01b95b424c254c6b71678

Modified Files
--------------
src/backend/access/transam/xlog.c     | 20 ++++++++++----------
src/bin/pg_test_fsync/pg_test_fsync.c | 12 ++++++------
src/include/access/xlogdefs.h         | 22 +++-------------------
3 files changed, 19 insertions(+), 35 deletions(-)



Message-ID: <E1oEgkb-000ebn-4F@gemulon.postgresql.org>
Permalink:  ../E1oEgkb-000ebn-4F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oEgkb-000ebn-4F@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Remove O_FSYNC and associated macros.
  In-Reply-To: <E1oEgkb-000ebn-4F@gemulon.postgresql.org>
  References: <E1oEgkb-000ebn-4F@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox