Re: Reducing ClogControlLock contention - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Reducing ClogControlLock contention
Date
Msg-id CANP8+jKUfWNz3FQS_2o19bV7vESO+v_WmBqkVrRoHPr1pTs5Kw@mail.gmail.com
Whole thread Raw
In response to Re: Reducing ClogControlLock contention  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 22 August 2015 at 15:14, Andres Freund <andres@anarazel.de> wrote:
 
TransactionIdSetPageStatus() calls TransactionIdSetStatusBit(), which
writes an 8 byte variable (the lsn). That's not safe.

This point was the main sticking point here.

It turns out that we don't need to store the LSN (8 bytes). 

WAL is fsynced every time we finish writing a file, so we only actually need to store the byte position within each file, so no more than 16MB. That fits within a 4 byte value, so can be written atomically. 

So I have a valid way forward for this approach. Cool.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: use_remote_estimate usage for join pushdown in postgres_fdw
Next
From: David Rowley
Date:
Subject: Re: Performance improvement for joins where outer side is unique