Re: Use WALReadFromBuffers in more places

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Jingtang Zhang <mrdrivingduck(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Use WALReadFromBuffers in more places
Date: 2026-12-03 03:06:45
Message-ID: CALj2ACUGPFjjMNHsNAk6LvLHUhgz5j_hG-rU9U0hmnah0i=_1Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Nov 26, 2026 at 1:36 AM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> And I got the below result (median of three runs). "WAL-disk reads" cannot be
> measured because the decoding time was less than 1 second.
>
> build WAL direct IO TPS scan ms WAL generated MB reader read MB file reads buffer hits WAL-disk reads WAL-disk writes
> PATCHED on 2859 626 284 284 36357 1 235 MB/s 24.6 MB/s
> PATCHED off 3166 174 284 284 36353 6 0 MB/s 24.8 MB/
> HEAD on 2611 634 284 284 36359 0 0 MB/s 24.4 MB/s
> HEAD off 7629 106 284 284 36359 0 0 MB/s 27.5 MB/s
>
> I have not analyzed via perf, but the result may show that WAL records cannot be
> read from the buffer thus a round trip for WALReadFromBuffers() wasted the time.
> Apart from the replication system, local read of WALs like logical decoding via
> SQL functions can be done less frequently, I'm afraid that this patch might cause
> a performance regression.
>
> how do you feel?

Thanks. Could you share the exact script (with the top-up patches if
any) and the test environment (instance type, any concurrent activity,
etc.)? I will verify it from my side.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shihao zhong 2026-12-03 03:07:20 Re: examine_variable ignored CollateExpr
Previous Message Fujii Masao 2026-12-03 02:44:09 Re: [PATCH] Do not reuse recovery snapshots after recovery ends