Re: Use WALReadFromBuffers in more places

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Jingtang Zhang <mrdrivingduck@gmail.com>, pgsql-hackers@lists.postgresql.org, Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Date: 2025-09-24T18:27:43Z
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 →
  1. Read WAL directly from WAL buffers.

On Wed, 2025-09-24 at 07:26 -0700, Bharath Rupireddy wrote:
> Right. Reading unflushed WAL buffers for replication was one of the
> motivations. But, in general, WALReadFromBuffers has more benefits
> since it lets WAL buffers act as a cache for reads, avoiding the need
> to re-read WAL from disk for (both physical and logical) replication.
> For example, it makes the use of direct I/O for WAL more realistic
> and
> can provide significant performance benefits [1].

Is it possible to do a POC that shows the potential benefit, or are we
still too far away?

Regards,
	Jeff Davis