Re: about some parameters

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: about some parameters
Date: 2010-01-02 06:12:15
Message-ID: 4B3EE3BF.60409@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
>> Every time i explain what is the fsync parameter for, the next thing i
>> always say is: "never turn it off", and now that we have
>> synchronous_commit there is no good reason for turn fsync off... so
>> why are we still let it be in the postgresql.conf where it's so
>> vulnerable to a misguided dba?
>
> It's a "never turn it off *in production*" kind of setting. That
> doesn't make it useless --- in development or debug situations it
> might be just fine.

It's also not insane to turn it off if you're log-shipping to another
machine, and you don't mind having to restore from your last PITR log
update.

Some people use MyISAM tables (in MySQL) for raw speed at the cost of
reliability. With Pg and fsync=off you can get much of the speed, but
still have solid transactional behavior and rational handling of bad
data. Sure, you risk downtime if you have to restore, but with a warm
standby following the logs you can just cut over to it while you rebuild
the master.

With the approaching support for upcoming synchronous replication, it
makes even more sense to consider using fsync=off in some environments.

I wouldn't do it personally, but then I don't have apps where losing the
last few minutes' data is in case of failure is acceptable.

--
Craig Ringer

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2010-01-02 08:50:02 Re: Cancelling idle in transaction state
Previous Message Bruce Momjian 2010-01-02 02:13:52 Re: Win64 warnings about size_t