Re: Remove fsync ON/OFF as a visible option? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove fsync ON/OFF as a visible option?
Date
Msg-id 11570.1426953240@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove fsync ON/OFF as a visible option?  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Remove fsync ON/OFF as a visible option?
Re: Remove fsync ON/OFF as a visible option?
Re: Remove fsync ON/OFF as a visible option?
List pgsql-hackers
Stephen Frost <sfrost@snowman.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
requiresrestart)#fsync = on                # turns forced synchronization on or off
 
+                                       # (fsync=off is dangerous, read the
+                                       # (manual before using it)#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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using 128-bit integers for sum, avg and statistics aggregates
Next
From: Jim Nasby
Date:
Subject: Re: Future directions for inheritance-hierarchy statistics