Re: [PERFORM] Upgrade to dual processor machine?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: Doug McNaught <doug(at)mcnaught(dot)org>, Henrik Steffen <steffen(at)city-map(dot)de>, Steve Wolfe <nw(at)codon(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Upgrade to dual processor machine?
Date: 2002-11-14 20:19:52
Message-ID: 21066.1037305192@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

"scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
> On 14 Nov 2002, Doug McNaught wrote:
>> fsync() is a system call that flushes a file's contents from the
>> buffer cache to disk. PG uses it to ensure consistency in the WAL
>> files. It is enabled by default. Do NOT disable it unless you know
>> exactly what you are doing and are prepared to sacrifice some data
>> integrity for performance.

> I thought the danger with WAL was minimized to the point of not being an
> issue anymore. Tom?

Actually, more the other way 'round: WAL minimizes the cost of using
fsync, since we now only need to fsync the WAL file and not anything
else. The risk of not using it is still data corruption --- mainly
because without fsync, we can't be certain that WAL writes hit disk
in advance of the corresponding data-page changes. If you have a crash,
the system will replay the log as far as it can; but if there are
additional unlogged changes in the data files, you might have
inconsistencies.

I'd definitely recommend keeping fsync on in any production
installation. For development maybe you don't care about data loss...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message アムス 2002-11-14 20:31:31 php3 compatibility?
Previous Message Erwan DUROSELLE 2002-11-14 20:07:50 rserv

Browse pgsql-performance by date

  From Date Subject
Next Message Henrik Steffen 2002-11-14 20:36:33 Re: [PERFORM] Upgrade to dual processor machine?
Previous Message scott.marlowe 2002-11-14 20:00:01 Re: Sort time