RE: Fix src/test/subscription/t/029_on_error.pl test when wal_debug is enabled

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Amit Kapila' <amit.kapila16@gmail.com>, Michael Paquier <michael@paquier.xyz>, Ilyasov Ian <ianilyasov@outlook.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-05-15T13:35:48Z
Lists: pgsql-hackers

Attachments

Dear Amit, Ian,

> I guess it could be more work if we want to enhance the test for
> ERRORs other than the primary key violation. One simple fix is to
> update the log_offset to the location of the LOG after successful
> replication of un-conflicted data. For example, the Log location after
> we execute the below line in the test:
> 
> # Check replicated data
>                my $res =
>                  $node_subscriber->safe_psql('postgres', "SELECT
> count(*) FROM tbl");
>                is($res, $expected, $msg);

I made a patch for confirmation purpose. This worked well on my environment.
Ian, how about you?

Best Regards,
Hayato Kuroda
FUJITSU LIMITED
https://www.fujitsu.com/ 

Commits

  1. Improve stability of subscription/029_on_error.pl