Re: "ERROR: deadlock detected" when replicating TRUNCATE
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-17T10:13:05Z
Lists: pgsql-hackers
On Mon, May 17, 2021 at 3:05 PM Dilip Kumar <dilipbalaut@gmail.com> wrote: > > On Mon, May 17, 2021 at 12:30 PM Peter Smith <smithpb2250@gmail.com> wrote: > > > PSA a patch adding a test for this scenario. > > I am not sure this test case is exactly targeting the problematic > behavior because that will depends upon the order of execution of the > apply workers right? > Yeah, so we can't guarantee that this test will always reproduce the problem but OTOH, I have tried two times and it reproduced both times. I guess we don't have a similar test where Truncate will replicate to two subscriptions, otherwise, we would have caught such a problem. Having said that, I am fine with leaving this test if others feel so on the grounds that it won't always lead to the problem reported. -- With Regards, Amit Kapila.
Commits
-
Fix deadlock for multiple replicating truncates of the same table.
- 71787b23e3dc 11.13 landed
- 18c6242b7c6d 12.8 landed
- c83c0257e4c3 13.4 landed
- 6d0eb3855715 14.0 landed
-
Logical replication support for TRUNCATE
- 039eb6e92f20 11.0 cited