Re: Replica Identity check of partition table on subscriber

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: "shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>
Cc: Amit Langote <amitlangote09@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Date: 2022-06-20T05:33:09Z
Lists: pgsql-hackers
On Fri, Jun 17, 2022 at 11:22 AM shiy.fnst@fujitsu.com
<shiy.fnst@fujitsu.com> wrote:
>
> On Fri Jun 17, 2022 11:06 AM shiy.fnst@fujitsu.com <shiy.fnst@fujitsu.com> wrote:
> >
> > Attached the new version of patch set. I also moved the partitioned table
> > check
> > in logicalrep_rel_mark_updatable() to check_relation_updatable() as
> > discussed
> > [2].
> >
>
> Attached back-branch patches of the first patch.
>

One minor comment:
+ /*
+ * If it is a partitioned table, we don't check it, we will check its
+ * partition later.
+ */

Can we change the above comment to: "For partitioned tables, we only
need to care if the target partition is updatable (aka has PK or RI
defined for it)."?

Apart from this looks good to me. I'll push this tomorrow unless there
are any more suggestions/comments.

-- 
With Regards,
Amit Kapila.



Commits

  1. Fix memory leak due to LogicalRepRelMapEntry.attrmap.

  2. Fix stale values in partition map entries on subscribers.

  3. Fix partition table's REPLICA IDENTITY checking on the subscriber.

  4. Fix data inconsistency between publisher and subscriber.

  5. Fix cache look-up failures while applying changes in logical replication.

  6. Add logical replication support to replicate into partitioned tables