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-ubuee1...@mail.gmail.com Best Regards, Nitin Jadhav Microsoft
