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-10 09:58:48
Message-ID: CAFPTHDY2O42ouQFMeEbPt51CWQ=zyzYhgK6B9basyd5PLaOv0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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>"

regards,
Ajin Cherian
Fujitsu Australia

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kostas Papadopoulos 2022-10-10 12:56:07 Same query, same data different plan
Previous Message Tom Lane 2022-10-10 02:45:54 Re: Different execution plan between PostgreSQL 8.4 and 12.11

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-10-10 10:04:22 Re: make_ctags: use -I option to ignore pg_node_attr macro
Previous Message Олег Целебровский 2022-10-10 09:53:43 Re[2]: Possible solution for masking chosen columns when using pg_dump