Re: Use WALReadFromBuffers in more places
Jingtang Zhang <mrdrivingduck@gmail.com>
From: Jingtang Zhang <mrdrivingduck@gmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, pgsql-hackers@lists.postgresql.org
Cc: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Date: 2024-10-15T08:22:32Z
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 →
-
Read WAL directly from WAL buffers.
- 91f2cae7a4e6 17.0 cited
Hi all. I've been back to this patch for a while recently. I witness that if a WAL writer works fast, the already flushed WAL buffers will be zeroed out and re-initialized for future use by AdvanceXLInsertBuffer in XLogBackgroundFlush, so that WALReadFromBuffers will miss even though the space of WAL buffer is enough. It is much more unfriendly for logical walsenders than physical walsenders, because logical ones consume WAL slower than physical ones due to the extra decoding phase. Seems that the aim of AdvanceXLInsertBuffer in WAL writer contradicts with our reading from WAL buffer. Any thoughts?