Re: Support logical replication of DDLs

From: Ajin Cherian <itsajin(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Zheng Li <zhengli10(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, rajesh singarapu <rajesh(dot)rs0541(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support logical replication of DDLs
Date: 2022-10-11 13:30:37
Message-ID: CAFPTHDZmS2PrOyJx8OAe+Nt-Fx4-GZetJatqCEJhDNXA2orwCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Oct 10, 2022 at 8:58 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
>
> On Fri, Oct 7, 2022 at 4:07 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > On Fri, 7 Oct 2022 at 08:10, Zheng Li <zhengli10(at)gmail(dot)com> wrote:
> > >
> > > > Thanks for the new patch-set.
> > > > Could you add the changes to patch 1 and patch 2, rather than adding a
> > > > new patch?
> > > > Otherwise, we'll have a separate patch for each command and it will
> > > > take double work to keep it updated
> > > > for each new command added.
> > >
> > > OK. Here is the consolidated patch set. TEXT SEARCH and TRANSFORM
> > > commands are consolidated into patch 1 and patch 2.
> > > I was wondering if keeping the changes for each command separate makes
> > > it easier to review. Maybe just for some commands that need special
> > > handling.
> >
> > I agree, let's keep the changes for the commands in patch 1 and patch
> > 2 if we are following the same parsing mechanism that is being
> > followed for the existing commands. If any command needs to be handled
> > in a more complex manner which is different from the existing parsing
> > mechanism then we can think of keeping it in a separate patch.
> >
> > CFBOT at [1] was failing as some additional changes were required to
> > handle the meson build errors and warnings. The attached patch has the
> > changes for the same.
> > [1] - https://cirrus-ci.com/task/5343002330660864
>
> Adding support for ddl deparsing CREATE/ALTER/DROP USER MAPPING and
>
> changes from Vignesh C for
> CREATE/ALTER/DROP SERVER
> CREATE/ALTER/DROP COLLATION
>
>
> I had to change the object identity of the user mapping as part of the deparsing
> to make the DROP command work on user mapping.
>
> FROM: "<role> on server <servername>"
> TO : "for <role> server <servername>"
>
>

Rebasing the patch-set as a recent commit broke it. Also fixed some whitespaces.

regards,
Ajin Cherian
Fujitsu Australia

Attachment Content-Type Size
v27-0004-Test-cases-for-DDL-replication.patch application/octet-stream 24.6 KB
v27-0003-Support-CREATE-TABLE-AS-SELECT-INTO.patch application/octet-stream 15.0 KB
v27-0001-Functions-to-deparse-DDL-commands.patch application/octet-stream 292.6 KB
v27-0002-Support-DDL-replication.patch application/octet-stream 131.7 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-10-11 13:59:43 Re: Different execution plan between PostgreSQL 8.4 and 12.11
Previous Message David Rowley 2022-10-11 10:53:36 Re: Re: Different execution plan between PostgreSQL 8.4 and 12.11

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-10-11 13:49:14 Re: Make EXPLAIN generate a generic plan for a parameterized query
Previous Message hubert depesz lubaczewski 2022-10-11 12:45:24 Re: Re: Is there any plan to support online schem change in postgresql?