Re: WAL does not recover gracefully from out-of-disk-sp ace - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WAL does not recover gracefully from out-of-disk-sp ace
Date
Msg-id 8571.984169845@sss.pgh.pa.us
Whole thread Raw
In response to RE: WAL does not recover gracefully from out-of-disk-sp ace  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
List pgsql-hackers
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
>> True.  But at least the write is (hopefully) being done at a
>> non-performance-critical time.

> There is no such hope: XLogWrite may be called from XLogFlush
> (at commit time and from bufmgr on replacements) *and* from XLogInsert
> - ie new log file may be required at any time.

Sure, but if we have create-ahead enabled then there's a good chance of
the log files being made by the checkpoint process, rather than by
working backends.  In that case the prefill is not time critical.

In any case, my tests so far show that prefilling and then writing with
O_SYNC or better O_DSYNC is in fact faster than not prefilling; this
matches pretty well the handwaving argument I gave Andreas this morning.
(With fsync() or fdatasync() it seems we're at the mercy of inefficient
kernel algorithms, a factor I didn't consider before.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: porting question: funky uid names?
Next
From: Peter Eisentraut
Date:
Subject: Re: Internationalized error messages