Re: subscriptioncheck failure - Mailing list pgsql-hackers

From vignesh C
Subject Re: subscriptioncheck failure
Date
Msg-id CALDaNm387e+SP9BxaLvboZQBE1rgQ0qgD-39H-jjjnRpme=wOg@mail.gmail.com
Whole thread Raw
In response to Re: subscriptioncheck failure  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Thu, May 13, 2021 at 4:41 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, May 13, 2021 at 04:14:55PM +0530, vignesh C wrote:
> > +$node_publisher->wait_for_catchup('tap_sub');
> > +
> >  # Ensure a transactional logical decoding message shows up on the slot
> >  $node_subscriber->safe_psql('postgres', "ALTER SUBSCRIPTION tap_sub DISABLE");
> >
> >  # wait for the replication connection to drop from the publisher
> >  $node_publisher->poll_query_until('postgres',
> > -     'SELECT COUNT(*) FROM pg_catalog.pg_stat_replication', 0);
> > +     "SELECT COUNT(*) FROM pg_catalog.pg_replication_slots WHERE slot_name = 'tap_sub' AND active='f'", 1);
>
> There are three places in this test where a slot is disabled, followed
> by a wait to make sure that the slot is gone.  Perhaps it would be
> better to wrap that in a small-ish routine?

Yes that would be better, I will make the changes for this and post a patch.

Regards,
Vignesh



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Inherited UPDATE/DELETE vs async execution
Next
From: Julien Rouhaud
Date:
Subject: Re: Executor code - found an instance of a WHILE that should just be an IF