Re: Improve WALRead() to suck data directly from WAL buffers when possible
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Andres Freund <andres@anarazel.de>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Dilip Kumar <dilipbalaut@gmail.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers@lists.postgresql.org,
Nathan Bossart <nathandbossart@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2024-04-08T05:17:46Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add XLogCtl->logInsertResult
- f3ff7bf83bce 17.0 cited
-
Add assert to WALReadFromBuffers().
- 9ecbf54075a9 17.0 landed
-
Read WAL directly from WAL buffers.
- 91f2cae7a4e6 17.0 landed
-
Additional write barrier in AdvanceXLInsertBuffer().
- 766571be1659 17.0 landed
-
Use 64-bit atomics for xlblocks array elements.
- c3a8e2a7cb16 17.0 landed
-
Don't trust unvalidated xl_tot_len.
- bae868caf222 17.0 cited
Attachments
- v27-0001-Add-test-module-to-demonstrate-reading-from-WAL.patch (application/x-patch) patch v27-0001
- v27-0002-Use-WALReadFromBuffers-in-more-places.patch (application/x-patch) patch v27-0002
On Thu, Mar 21, 2024 at 11:33 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > Please find the v26 patches after rebasing. Commit f3ff7bf83b added a check in WALReadFromBuffers to ensure the requested WAL is not past the WAL that's copied to WAL buffers. So, I've dropped v26-0001 patch. I've attached v27 patches for further review. 0001 adds a test module to demonstrate reading from WAL buffers patterns like the caller ensuring the requested WAL is fully copied to WAL buffers using WaitXLogInsertionsToFinish and an implementation of xlogreader page_read callback to read unflushed/not-yet-flushed WAL directly from WAL buffers. 0002 Use WALReadFromBuffers in more places like for logical walsenders, logical decoding functions, backends reading WAL. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com