Re: Fix instability in subscription regression test - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Fix instability in subscription regression test
Date
Msg-id CAD21AoDmg59tUKSTs5PGrsKERkVNa4HYx9BWLMrEGH56y7v9hQ@mail.gmail.com
Whole thread Raw
In response to Fix instability in subscription regression test  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
List pgsql-hackers
On Thu, Jun 23, 2022 at 8:28 PM houzj.fnst@fujitsu.com
<houzj.fnst@fujitsu.com> wrote:
>
> Hi,
>
> I noticed BF member wrasse failed in 028_row_filter.pl.
>
> #   Failed test 'check publish_via_partition_root behavior'
> #   at t/028_row_filter.pl line 669.
> #          got: ''
> #     expected: '1|100
> #              ...
>
> Log:
> 2022-06-23 11:27:42.387 CEST [20589:3] 028_row_filter.pl LOG: statement: ALTER SUBSCRIPTION tap_sub REFRESH
PUBLICATIONWITH (copy_data = true)
 
> 2022-06-23 11:27:42.470 CEST [20589:4] 028_row_filter.pl LOG: disconnection: session time: 0:00:00.098 user=nm
database=postgreshost=[local]
 
> 2022-06-23 11:27:42.611 CEST [20593:1] LOG: logical replication table synchronization worker for subscription
"tap_sub",table "tab_rowfilter_partitioned" has started
 
> ...
> 2022-06-23 11:27:43.197 CEST [20610:3] 028_row_filter.pl LOG: statement: SELECT a, b FROM tab_rowfilter_partitioned
ORDERBY 1, 2
 
> ...
> 2022-06-23 11:27:43.689 CEST [20593:2] LOG: logical replication table synchronization worker for subscription
"tap_sub",table "tab_rowfilter_partitioned" has finished
 
>
> From the Log, I can see it query the target table before the table sync is
> over. So, I think the reason is that we didn't wait for table sync to
> finish after refreshing the publication. Sorry for not catching that
> ealier. Here is a patch to fix it.

+1

The patch looks good to me.

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size
Next
From: Amit Kapila
Date:
Subject: Re: Fix instability in subscription regression test