Re: Add two missing tests in 035_standby_logical_decoding.pl

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, "Yu Shi (Fujitsu)" <shiy(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add two missing tests in 035_standby_logical_decoding.pl
Date: 2023-05-05 12:28:18
Message-ID: CAA4eK1KhmUopfMDR+0ZkBSGerXet1XWGyguhE=ZwV5ZUUcQt7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 5, 2023 at 5:36 PM Drouvot, Bertrand
<bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>
> On 5/5/23 12:58 PM, Amit Kapila wrote:
> > On Fri, May 5, 2023 at 4:02 PM Drouvot, Bertrand
> > <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>
> > How did you concluded that 000000010000000000000003 is the file the
> > test is expecting to be removed?
> >
> because I added a note in the test that way:
>
> "
> @@ -535,6 +539,7 @@ $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;
> +note "BDT WAL file is $standby_walfile";
> ok(!-f "$standby_walfile",
> "invalidated logical slots do not lead to retaining WAL");
> "
>
> so that I can check in the test log file:
>
> grep "WAL file is" ./build/testrun/recovery/035_standby_logical_decoding/log/regress_log_035_standby_logical_decoding
> [08:23:31.931](2.217s) # BDT WAL file is /Users/admin/pgsql/build/testrun/recovery/035_standby_logical_decoding/data/t_035_standby_logical_decoding_standby_data/pgdata/pg_wal/000000010000000000000003
>

It seems due to some reason the current wal file is not switched due
to some reason. I think we need to add more DEBUG info to find that
out. Can you please try to print 'RedoRecPtr', '_logSegNo', and
recptr?

/*
* Delete old log files, those no longer needed for last checkpoint to
* prevent the disk holding the xlog from growing full.
*/
XLByteToSeg(RedoRecPtr, _logSegNo, wal_segment_size);
KeepLogSeg(recptr, &_logSegNo);

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-05-05 12:30:11 Re: Fix typos and inconsistencies for v16
Previous Message Drouvot, Bertrand 2023-05-05 12:06:41 Re: Add two missing tests in 035_standby_logical_decoding.pl