Thanks for the comments. At Fri, 16 Jun 2023 11:30:15 +0900, Michael Paquier <mich...@paquier.xyz> wrote in > > -$node_primary->safe_psql( > > - 'postgres', "create table retain_test(a int); > > - select pg_switch_wal(); > > - insert into retain_test values(1); > > - checkpoint;"); > > +$node_primary->advance_wal(1); > > +$node_primary->safe_psql('postgres', "checkpoint;"); > > > > The original test generated some WAL after the segment switch, which > > appears to be a significant characteristics of the test. > > Still it does not matter for this specific case? The logical slot has > been already invalidated, so we don't care much about logical changes > in WAL, do we?
The change itself doesn't seem to matter, but it seems intended to let checkpoint trigger the removal of the last segment. However, I'm unsure how the insert would influence this that way. If my understanding is correct, then I'd support its removal. regards. -- Kyotaro Horiguchi NTT Open Source Software Center