RE: Truncate in synchronous logical replication failed
Takamichi Osumi (Fujitsu) <osumi.takamichi@fujitsu.com>
From: "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
To: 'Amit Kapila' <amit.kapila16@gmail.com>
Cc: Ajin Cherian <itsajin@gmail.com>, Japin Li <japinli@hotmail.com>, Petr
Jelinek <petr.jelinek@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-23T13:48:37Z
Lists: pgsql-hackers
Attachments
- truncate_in_synchronous_logical_replication_v07.patch (application/octet-stream) patch v7
On Friday, April 23, 2021 6:03 PM I wrote:
> I've combined v5 with above accepted comments.
>
> Just in case, I've conducted make check-world, the test of
> clobber_cache_always mode again for v6 and tight loop test of 100 times for
> 010_truncate.pl.
> The result is that all passed with no failure.
I'm sorry, I realized another minor thing which should be fixed.
In v6, I did below.
+Bitmapset *
+RelationGetIdentityKeyBitmap(Relation relation)
+{
+ Bitmapset *idindexattrs; /* columns in the replica identity */
...
+ /* Build attributes to idindexattrs */
+ idindexattrs = NULL;
But, we removed the loop, so we can insert NULL
at the beginning to declare idindexattrs.
v7 is the version to update this part and
related comments from v6.
Best Regards,
Takamichi Osumi
Commits
-
Fix Logical Replication of Truncate in synchronous commit mode.
- e7eea52b2d61 14.0 landed
-
Logical decoding of TRUNCATE
- 5dfd1e5a6696 11.0 cited