Re: Add a perl function in Cluster.pm to generate WAL - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Add a perl function in Cluster.pm to generate WAL
Date
Msg-id 20230616.133021.167594806623150998.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: Add a perl function in Cluster.pm to generate WAL  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Thanks for the comments.

At Fri, 16 Jun 2023 11:30:15 +0900, Michael Paquier <michael@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



pgsql-hackers by date:

Previous
From: Masahiro Ikeda
Date:
Subject: Re: Support to define custom wait events for extensions
Next
From: Nathan Bossart
Date:
Subject: Re: add non-option reordering to in-tree getopt_long