On Fri, Dec 24, 2021 at 1:42 PM Kyotaro Horiguchi <horikyota....@gmail.com> wrote: > > At Thu, 23 Dec 2021 18:08:08 +0530, Ashutosh Bapat > <ashutosh.bapat....@gmail.com> wrote in > > On Wed, Dec 15, 2021 at 9:42 AM Kyotaro Horiguchi > > <horikyota....@gmail.com> wrote: > > > > LOG: invalidating slot "s1" > > > > DETAIL: The slot's restart_lsn 0/10000D68 is behind the limit > > > > 0/11000000 defined by max_slot_wal_keep_size. > > > > > > The second line could be changed like the following or anything other. > > > > > > > DETAIL: The slot's restart_lsn 0/10000D68 got behind the limit > > > > 0/11000000 determined by max_slot_wal_keep_size. > > > ..... > > > > > > > The second version looks better as it gives more details. I am fine > > with either of the above wordings. > > > > I would prefer everything in the same message though since > > "invalidating slot ..." is too short a LOG message. Not everybody > > enabled details always. > > Mmm. Right. I have gone too much to the same way with the > process-termination message. > > I rearranged the meesages as follows in the attached version. (at master)
Thank you for the patch! +1 for improving the messages. > > > LOG: terminating process %d to release replication slot \"%s\" because its > > restart_lsn %X/%X exceeds max_slot_wal_keep_size > > DETAIL: The slot got behind the limit %X/%X determined by > > max_slot_wal_keep_size. > > > LOG: invalidating slot \"%s\" because its restart_LSN %X/%X exceeds > > max_slot_wal_keep_size > c> DETAIL: The slot got behind the limit %X/%X determined by > max_slot_wal_keep_size. - LSN_FORMAT_ARGS(restart_lsn)))); + LSN_FORMAT_ARGS(restart_lsn)), + errdetail("The slot got behind the limit %X/%X determined by max_slot_wal_keep_size.", + LSN_FORMAT_ARGS(oldestLSN)))); Isn't oldestLSN calculated not only by max_slot_wal_keep_size but also by wal_keep_size? Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/