Re: [HACKERS] TODO item - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] TODO item
Date
Msg-id 20056.949942065@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] TODO item  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] TODO item  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Don't tell me we fsync on every buffer write, and not just at
> transaction commit?  That is terrible.

If you don't have -F set, yup.  Why did you think fsync mode was
so slow?

> What if we set a flag on the file descriptor stating we dirtied/wrote
> one of its buffers during the transaction, and cycle through the file
> descriptors on buffer commit and fsync all involved in the transaction. 

That's exactly what Tatsuo was describing, I believe.  I think Hiroshi
has pointed out a serious problem that would make it unreliable when
multiple backends are running: if some *other* backend fwrites the page
instead of your backend, and it doesn't fsync until *its* transaction is
done (possibly long after yours), then you lose the ordering guarantee
that is the point of the whole exercise...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] TODO item
Next
From: Lamar Owen
Date:
Subject: Re: [HACKERS] New Globe