Improve wording of log messages triggered by max_slot_wal_keep_size.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Sep 2022 17:27:48 +0000 (13:27 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Sep 2022 17:27:48 +0000 (13:27 -0400)
commit551aa6b7b9f3b78e7b6cbab1fea70947fa7f4966
treee1ce6e1dfede8d6f24f56053a955e16ce24ea607
parentd7e39d72ca1c6f188b400d7d58813ff5b5b79064
Improve wording of log messages triggered by max_slot_wal_keep_size.

The one about "terminating process to release replication slot" told
you nothing about why that was happening.  The one about "invalidating
slot because its restart_lsn exceeds max_slot_wal_keep_size" told you
what was happening, but violated our message style guideline about
keeping the primary message short.  Add DETAIL/HINT lines to carry
the appropriate detail and make the two cases more uniform.

While here, fix bogus test logic in 019_replslot_limit.pl: if it timed
out without seeing the expected log message, no test failure would be
reported.  This is flat broken since commit 549ec201d removed the test
counts; even before that it was horribly bad style, since you'd only
get told that not all tests had been run.

Kyotaro Horiguchi, reviewed by Bertrand Drouvot; test fixes by me

Discussion: https://postgr.es/m/20211214.130456.2233153190058148084.horikyota.ntt@gmail.com
src/backend/replication/slot.c
src/test/recovery/t/019_replslot_limit.pl