Re: fsync method checking - Mailing list pgsql-hackers

From Tom Lane
Subject Re: fsync method checking
Date
Msg-id 22121.1071264527@sss.pgh.pa.us
Whole thread Raw
In response to Re: fsync method checking  (Manfred Spraul <manfred@colorfullife.com>)
List pgsql-hackers
Manfred Spraul <manfred@colorfullife.com> writes:
> One advantage of a seperate write and fsync call is better performance
> for the writes that are triggered within AdvanceXLInsertBuffer: I'm not
> sure how often that's necessary, but it's a write while holding both the
> WALWriteLock and WALInsertLock. If every write contains an implicit
> sync, that call would be much more expensive than necessary.

Ideally that path isn't taken very often.  But I'm currently having a
discussion off-list with a CMU student who seems to be seeing a case
where it happens a lot.  (She reports that both WALWriteLock and
WALInsertLock are causes of a lot of process blockages, which seems to
mean that a lot of the WAL I/O is being done with both held, which would
have to mean that AdvanceXLInsertBuffer is doing the I/O.  More when we
figure out what's going on exactly...)

            regards, tom lane

pgsql-hackers by date:

Previous
From: Thomas Swan
Date:
Subject: Re: Resurrecting pg_upgrade
Next
From: Dave Smith
Date:
Subject: Re: Resurrecting pg_upgrade