Re: Improve WALRead() to suck data directly from WAL buffers when possible - Mailing list pgsql-hackers

From SATYANARAYANA NARLAPURAM
Subject Re: Improve WALRead() to suck data directly from WAL buffers when possible
Date
Msg-id CAHg+QDcrb7VpwDq7LctajUf0-9Z2T2R3nSd7AqeJxk8b8o9s-w@mail.gmail.com
Whole thread Raw
In response to Re: Improve WALRead() to suck data directly from WAL buffers when possible  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers


On Sat, Jan 14, 2023 at 12:34 PM Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2023-01-14 00:48:52 -0800, Jeff Davis wrote:
> On Mon, 2022-12-26 at 14:20 +0530, Bharath Rupireddy wrote:
> > Please review the attached v2 patch further.
>
> I'm still unclear on the performance goals of this patch. I see that it
> will reduce syscalls, which sounds good, but to what end?
>
> Does it allow a greater number of walsenders? Lower replication
> latency? Less IO bandwidth? All of the above?

One benefit would be that it'd make it more realistic to use direct IO for WAL
- for which I have seen significant performance benefits. But when we
afterwards have to re-read it from disk to replicate, it's less clearly a win.

 +1. Archive modules rely on reading the wal files for PITR. Direct IO for WAL requires reading these files from disk anyways for archival. However, Archiving using utilities like pg_receivewal can take advantage of this patch together with direct IO for WAL.

Thanks,
Satya

pgsql-hackers by date:

Previous
From: gkokolatos@pm.me
Date:
Subject: Re: Add LZ4 compression in pg_dump
Next
From: Andres Freund
Date:
Subject: Re: Improve WALRead() to suck data directly from WAL buffers when possible