Re: Allowing WAL fsync to be done via O_SYNC - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Allowing WAL fsync to be done via O_SYNC
Date
Msg-id Pine.LNX.4.30.0103152234500.826-100000@peter.localdomain
Whole thread Raw
In response to Re: Allowing WAL fsync to be done via O_SYNC  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Allowing WAL fsync to be done via O_SYNC
List pgsql-hackers
Tom Lane writes:

> I've been mentally working through the code, and see only one reason why
> it might be necessary to go with a compile-time choice: suppose we see
> that none of O_DSYNC, O_SYNC, O_FSYNC, [others] are defined?

We postulate that one of those has to exist.  Alternatively, you make the
option read

wal_sync_method = fsync | open_sync

In the "parse_hook" for the parameter you if #ifdef out 'open_sync' as a
valid option if none of those exist, so a user will get "'open_sync' is
not a valid option value".

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: Allowing WAL fsync to be done via O_SYNC
Next
From: Bruce Momjian
Date:
Subject: Re: Allowing WAL fsync to be done via O_SYNC