Re: Allowing WAL fsync to be done via O_SYNC

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Allowing WAL fsync to be done via O_SYNC
Date: 2001-03-15 18:17:20
Message-ID: Pine.LNX.4.30.0103151910390.826-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-03-15 18:18:57 Re: rtrim giving weird result
Previous Message Tom Lane 2001-03-15 18:15:18 Re: Allowing WAL fsync to be done via O_SYNC