Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()
Date
Msg-id 22118.1515795894@sss.pgh.pa.us
Whole thread Raw
In response to Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation()  (Andres Freund <andres@anarazel.de>)
Responses Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation()
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-01-12 10:45:54 -0500, Tom Lane wrote:
>> The xl_prev field is our only way of detecting that we're looking at
>> old WAL data when we cross a sector boundary.

> Right. I wonder if it be reasonable to move that to a page's header
> instead of individual records?  To avoid torn page issues we'd have to
> reduce the page size to a sector size, but I'm not sure that's that bad?

Giving up a dozen or two bytes out of every 512 sounds like quite an
overhead.  Also, this'd mean that a much larger fraction of WAL records
need to be split across page boundaries, which I'd expect to produce a
performance hit in itself --- a page crossing has to complicate figuring
out how much space we need for the record.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP: a way forward on bootstrap data
Next
From: Andres Freund
Date:
Subject: Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation()