Re: finding changed blocks using WAL scanning - Mailing list pgsql-hackers

From Robert Haas
Subject Re: finding changed blocks using WAL scanning
Date
Msg-id CA+TgmoY5MHgc-UcTPCRKfJYor+2DnRY0rKiGo-5b51jfU4t_dg@mail.gmail.com
Whole thread Raw
In response to Re: finding changed blocks using WAL scanning  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: finding changed blocks using WAL scanning
List pgsql-hackers
On Mon, Apr 22, 2019 at 7:04 PM Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> Some time ago there was a discussion about prefetching blocks during
> recovery on a standby, and that's a great example of a use case that
> benefit from this - look which blocks where modified in the next chunk
> of WAL, prefetch them. But that requires fairly detailed information
> about which blocks were modified in the next few megabytes of WAL.
>
> So just doing it once per checkpoint (or even anything above a single
> WAL segment) and removing all the detailed LSN location makes it useless
> for this use case.

For this particular use case, wouldn't you want to read the WAL itself
and use that to issue prefetch requests?  Because if you use the
.modblock files, the data file blocks will end up in memory but the
WAL blocks won't, and you'll still be waiting for I/O.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: pg_dump is broken for partition tablespaces
Next
From: Michael Paquier
Date:
Subject: Re: Regression test PANICs with master-standby setup on same machine