Re: Reporting WAL replay progress during pre-consistency standby reovery

From: Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reporting WAL replay progress during pre-consistency standby reovery
Date: 2026-10-30 10:13:44
Message-ID: CAMm1aWYzgw=6K91WVVAYH6qkH_MtnW_MWbjWmc9YNrtO2Qr7iA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Fujii-san,

> What about the startup process title shown by ps? During recovery,
> it shows which WAL file is being replayed, even before consistency is
> reached. This provides file-level progress, though not the exact replay LSN.

Thanks for pointing that out. Yes, the startup process title provides
a useful live indication of the WAL segment currently being replayed.
It should be possible to estimate a coarse replay rate by polling the
process title externally and recording when the WAL filename changes.
However, it does not show progress within a WAL segment and does not
leave a historical record unless such polling is already in place.

Periodic messages containing the replay LSN and a timestamp would make
it possible to calculate the replay rate between samples and perform
after-the-fact analysis using the server logs. This also seems
consistent with the motivation for the existing crash recovery
progress reporting. The original discussion [1] acknowledged that WAL
replay could be identified using ps, but noted that this was less
convenient and worked only while recovery was being observed, rather
than when examining logs afterward. The proposed patch extends that
existing reporting only during the bounded pre-consistency period and
stops it once consistency is reached.

Does that distinction make sense, or do you think the process-title
information is sufficient for this case?

[1] https://postgr.es/m/CA+TgmoaHQrgDFOBwgY16XCoMtXxsrVGFB2jNCvb7-ubuEe1MGg@mail.gmail.com

Best Regards,
Nitin Jadhav
Microsoft

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2026-10-30 10:23:22 GiST intarray build speedup: two-arg fast path
Previous Message Fujii Masao 2026-10-30 10:12:36 Re: Incremental backup can use a summary past a timeline switch