Re: Single transaction in the tablesync worker?
Ajin Cherian <itsajin@gmail.com>
From: Ajin Cherian <itsajin@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-02T10:03:52Z
Lists: pgsql-hackers
On Tue, Feb 2, 2021 at 7:40 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Tue, Feb 2, 2021 at 10:34 AM Ajin Cherian <itsajin@gmail.com> wrote: > > > > On Mon, Feb 1, 2021 at 11:26 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > I have updated the patch to display WARNING for each of the tablesync > > > slots during DropSubscription. As discussed, I have moved the drop > > > slot related code towards the end in AlterSubscription_refresh. Apart > > > from this, I have fixed one more issue in tablesync code where in > > > after catching the exception we were not clearing the transaction > > > state on the publisher, see changes in LogicalRepSyncTableStart. I > > > have also fixed other comments raised by you. Additionally, I have > > > removed the test because it was creating the same name slot as the > > > tablesync worker and tablesync worker removed the same due to new > > > logic in LogicalRepSyncStart. Earlier, it was not failing because of > > > the bug in that code which I have fixed in the attached. > > > > > > > I was testing this patch. I had a table on the subscriber which had a > > row that would cause a PK constraint > > violation during the table copy. This is resulting in the subscriber > > trying to rollback the table copy and failing. > > > > I am not getting this error. I have tried by below test: I am sorry, my above steps were not correct. I think the reason for the failure I was seeing were some other steps I did prior to this. I will recreate this and update you with the appropriate steps. regards, Ajin Cherian Fujitsu Australia
Commits
-
Fix relcache reference leak introduced by ce0fdbfe97.
- 8a4f9522d0c7 14.0 landed
-
Fix Subscription test added by commit ce0fdbfe97.
- c8b21b037814 14.0 landed
-
Allow multiple xacts during table sync in logical replication.
- ce0fdbfe9722 14.0 landed
-
Logical replication support for initial data copy
- 7c4f52409a8c 10.0 cited