Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Chao Li
Hi Hackers, I noticed a problem with pg_waldump. When "-e" is not specified, or given a bigger number beyond the current LSN, pg_dump always print an error message like: ``` chaol@ChaodeMacBook-Air cndb % pg_waldump -p pg_wal -s 0/2980DE10 -e 0/2980E680 <...omit some outputs...> rmgr: Standby

Re: Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Chao Li
Hi Fujii and Michael, Thanks for your comments. > On Sep 3, 2025, at 10:47, Michael Paquier wrote: > > On Wed, Sep 03, 2025 at 09:11:15AM +0900, Fujii Masao wrote: >> Can pg_waldump really distinguish between the end of WAL and corruption? > > I don't think you can really do that reliably, as

Re: Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Michael Paquier
On Wed, Sep 03, 2025 at 09:11:15AM +0900, Fujii Masao wrote: > Can pg_waldump really distinguish between the end of WAL and corruption? I don't think you can really do that reliably, as some of the messages marking the end of WAL could also be bumped into upon a corruption, as far as I recall. We

Re: Fix pg_waldump to exit cleanly at end of WAL

2025-09-02 Thread Fujii Masao
On Tue, Sep 2, 2025 at 5:42 PM Chao Li wrote: > > Hi Hackers, > > I noticed a problem with pg_waldump. When "-e" is not specified, or given a > bigger number beyond the current LSN, pg_dump always print an error message > like: > > ``` > chaol@ChaodeMacBook-Air cndb % pg_waldump -p pg_wal -s 0/2