| From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Reducing ClogControlLock contention |
| Date: | 2015-12-16 22:28:15 |
| Message-ID: | CANP8+jKUfWNz3FQS_2o19bV7vESO+v_WmBqkVrRoHPr1pTs5Kw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 22 August 2015 at 15:14, Andres Freund <andres(at)anarazel(dot)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/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2015-12-16 22:40:47 | Re: Performance improvement for joins where outer side is unique |
| Previous Message | Robert Haas | 2015-12-16 21:28:01 | Re: use_remote_estimate usage for join pushdown in postgres_fdw |