On Wed, 3 May 2023 at 15:59, Amit Kapila <amit.kapil...@gmail.com> wrote: > > On Tue, May 2, 2023 at 4:52 PM Drouvot, Bertrand > <bertranddrouvot...@gmail.com> wrote: > > > > > > As per your suggestion, changing the insert ordering (like in V8 attached) > > makes it now work on the failing environment too. > > > > I think it is better to use wait_for_replay_catchup() to wait for > standby to catch up. I have changed that and a comment in the > attached. I'll push this tomorrow unless there are further comments.
Thanks for posting the updated patch, I had run this test in a loop of 100 times to verify that there was no failure because of race conditions. The 100 times execution passed successfully. One suggestion: "wal file" should be changed to "WAL file": +# Request a checkpoint on the standby to trigger the WAL file(s) removal +$node_standby->safe_psql('postgres', 'checkpoint;'); + +# Verify that the wal file has not been retained on the standby +my $standby_walfile = $node_standby->data_dir . '/pg_wal/' . $walfile_name; Regards, Vignesh