On 2025/03/26 5:26, m.litsarev@postgrespro.ru wrote:
> Hi!
>
>> I felt you might have missed attaching the test patches added at [1].
> Well, the tests were written for the initial proposal which (after Michael's review and advices) has been fixed and
updated.The original tests became not relevant actually. That is why I dropped them.
>
>> This change is not required:
> Placed back the empty line. The v7 patch is attached.
Wouldn't pg_last_wal_receive_lsn() be almost sufficient for the purpose?
It generally returns NULL in archive recovery mode and a valid LSN
in standby mode. While it's not a perfect solution since it may return NULL
in standby mode until the WAL receiver starts, but it should work in most cases.
Thought?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION