Re: Remove fsync ON/OFF as a visible option?

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove fsync ON/OFF as a visible option?
Date: 2015-03-21 16:26:18
Message-ID: 20150321162618.GA28815@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 21, 2015 at 11:54:00AM -0400, Tom Lane wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > At the moment, one could look at our default postgresql.conf and the
> > "turns forced synchronization on or off" and think it's something akin
> > or somehow related to synchronous_commit (which is completely different,
> > but the options are right next to each other..).
>
> > How about a big warning around fsync and make it more indepenent from
> > the options around it?
>
> Yeah, the main SGML docs are reasonably clear about the risks of fsync,
> but postgresql.conf doesn't give you any hint that it's dangerous. Now
> I'm not entirely sure that people who frob postgresql.conf without having
> read the docs can be saved from themselves, but we could do something
> like this:
>
> # - Settings -
>
> #wal_level = minimal # minimal, archive, hot_standby, or logical
> # (change requires restart)
> #fsync = on # turns forced synchronization on or off
> + # (fsync=off is dangerous, read the
> + # (manual before using it)

I think this will help people who find themselves in that file with
few (or wrong) ideas of what this does.

> #synchronous_commit = on # synchronization level;
> # off, local, remote_write, or on
> #wal_sync_method = fsync # the default is the first option
> # supported by the operating system:
>
> Also, I think the short description "turns forced synchronization on or
> off" could stand improvement; it really conveys zero information. Maybe
> something like "force data to disk when committing"?
>
> Also, whatever we do here should be reflected into the description strings
> in guc.c.

I don't suppose there's a way to have a single point of truth...

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2015-03-21 16:42:01 Re: Remove fsync ON/OFF as a visible option?
Previous Message Jim Nasby 2015-03-21 16:12:08 Re: Future directions for inheritance-hierarchy statistics