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.0103151910390.826-100000@peter.localdomain
Whole thread Raw
In response to 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 think we need to make both O_SYNC and fsync() choices available in
> 7.1.  Two important questions need to be settled:
>
> 1. Is a compile-time flag (in config.h.in) good enough, or do we need
> to make it configurable via a GUC variable?  (A variable would have to
> be postmaster-start-time changeable only, so you'd still need a
> postmaster restart to change it.)

As a general rule, if something can be a run time option, as opposed to a
compile time option, then it should be.  At the very least you keep the
installation simple and allow for easier experimenting.

> There's also the lesser question of what to call the config symbol
> or variable.

I suggest "wal_use_fsync" as a GUC variable, assuming the default would be
off.  Otherwise "wal_use_open_sync".  (Use a general-to-specific naming
scheme to allow for easier grouping.  Having defaults be "off"
consistently is more intuitive.)

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



pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: rtrim giving weird result
Next
From: Tom Lane
Date:
Subject: Re: Allowing WAL fsync to be done via O_SYNC