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

From Andres Freund
Subject Re: Changing WAL Header to reduce contention duringReserveXLogInsertLocation()
Date
Msg-id 20180112215858.4xqa45fvi3w45as2@alap3.anarazel.de
Whole thread Raw
In response to Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()
List pgsql-hackers
On 2018-01-12 10:45:54 -0500, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Sat, Dec 30, 2017 at 5:32 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > I have some reservations about whether this makes the mechanism less
> > reliable.
> 
> Yeah, it scares me too.

Same here.


> 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?


> > Of course, we also have xl_crc, so I'm not sure whether there's any
> > chance of real harm...
> 
> The CRC only tells you that you have a valid WAL record, it won't clue
> you in that it's old data you shouldn't replay.

Yea, I don't like relying on the CRC alone at all.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: WIP: a way forward on bootstrap data
Next
From: Tom Lane
Date:
Subject: Re: WIP: a way forward on bootstrap data