Re: Support logical replication of DDLs

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>, Runqi Tian <runqidev(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, li jie <ggysxcq(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, rajesh singarapu <rajesh(dot)rs0541(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zheng Li <zhengli10(at)gmail(dot)com>
Subject: Re: Support logical replication of DDLs
Date: 2023-04-10 11:20:09
Message-ID: CAA4eK1LyEqEq0XCeCsd9ZmTHyeshHbv=BiRTD=1mmk+YtxwpkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Fri, Apr 7, 2023 at 8:52 AM houzj(dot)fnst(at)fujitsu(dot)com
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> Sorry, there was a miss when rebasing the patch which could cause the
> CFbot to fail and here is the correct patch set.
>

I see the following note in the patch: "Note: For ATTACH/DETACH
PARTITION, we haven't added extra logic on the subscriber to handle
the case where the table on the publisher is a PARTITIONED TABLE while
the target table on the subscriber side is a NORMAL table. We will
research this more and improve it later." and wonder what should we do
about this. I can think of the following possibilities: (a) Convert a
non-partitioned table to a partitioned one and then attach the
partition; (b) Add the partition as a separate new table; (c) give an
error that table types mismatch. For Detach partition, I don't see
much possibility than giving an error that no such partition exists or
something like that. Even for the Attach operation, I prefer (c) as
the other options don't seem logical to me and may add more complexity
to this work.

Thoughts?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2023-04-10 11:33:41 Re: [EXTERNAL]: Re: [EXTERNAL]: Re: UPSERT in Postgres
Previous Message Zhijie Hou (Fujitsu) 2023-04-10 09:46:05 RE: Support logical replication of DDLs

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2023-04-10 11:25:58 Re: Unnecessary confirm work on logical replication
Previous Message Zhijie Hou (Fujitsu) 2023-04-10 09:46:05 RE: Support logical replication of DDLs