Re: Handle infinite recursion in logical replication setup
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>,
Peter Smith <smithpb2250@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Dilip Kumar <dilipbalaut@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>,
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>,
"Jonathan S. Katz" <jkatz@postgresql.org>
Date: 2022-09-08T02:53:00Z
Lists: pgsql-hackers
On Thu, Sep 8, 2022 at 7:57 AM vignesh C <vignesh21@gmail.com> wrote: > > There is a buildfarm failure on mylodon at [1] because of the new test > added. I will analyse and share the findings for the same. > > [1] - https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mylodon&dt=2022-09-08%2001%3A40%3A27 > The log is as below: error running SQL: 'psql:<stdin>:1: ERROR: could not drop relation mapping for subscription "tap_sub_a_b_2" DETAIL: Table synchronization for relation "tab_new" is in progress and is in state "s". HINT: Use ALTER SUBSCRIPTION ... ENABLE to enable subscription if not already enabled or use DROP SUBSCRIPTION ... to drop the subscription.' while running 'psql -XAtq -d port=50352 host=/tmp/WMoRd6ngw2 dbname='postgres' -f - -v ON_ERROR_STOP=1' with sql 'DROP TABLE tab_new' at /mnt/resource/bf/build/mylodon/HEAD/pgsql.build/../pgsql/src/test/perl/PostgreSQL/Test/Cluster.pm line 1860. ### Stopping node "node_A" using mode immediate This clearly indicates the problem. We can't drop the relation till it is marked ready in pg_subscription_rel and prior to dropping, the test just does $node_A->wait_for_subscription_sync($node_B, $subname_AB2);. This doesn't ensure that relation is in 'ready' state as it will finish even when the relation is in 'syncdone' state. So, I think if we want to drop the tables, we need to poll for 'ready' state or otherwise, anyway, this is the end of all tests and nodes won't be reused, so we can remove the clean-up in the end. Any other ideas? -- With Regards, Amit Kapila.
Commits
-
Improved CREATE SUBSCRIPTION message for clarity
- 1e7ca1189ccc 17.0 landed
- 842b65905046 16.0 landed
-
Fix the test case introduced by commit 8756930190.
- 032465157347 16.0 landed
-
Raise a warning if there is a possibility of data from multiple origins.
- 875693019053 16.0 landed
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited
-
Bump catversion for commit d8cd0c6c95c0120168df93aae095df4e0682a08a.
- 5f858dd3bebd 16.0 cited
-
Allow users to skip logical replication of data having origin.
- 366283961ac0 16.0 landed
-
Improve two comments related to a boolean DefElem's value
- 8445f5a21d40 16.0 cited
-
doc: Fix man page whitespace issues
- d7ab2a9a3c0a 15.0 cited