Re: Support logical replication of DDLs

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Zheng Li <zhengli10(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, li jie <ggysxcq(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(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>, 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>, 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: 2023-01-13 06:33:26
Message-ID: CALDaNm0mnkHXnQ7zMDxY6=ZtWn8A1iKLKGhEtqRVC9c3gc8YCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sat, 7 Jan 2023 at 20:58, Zheng Li <zhengli10(at)gmail(dot)com> wrote:
>
> Hi,
>
> I added documentation and changed user interface design in the
> attached v60 patch set.
> The patch set addressed comments from Peter in [1].
>
> The motivation for the user interface change is that we want to manage
> DDL replication feature in stages with fine grained replication
> levels.
> For example, we can focus on reviewing and testing table commands
> first, then other commands. It also make sense to introduce different
> DDL replication levels
> from the user perspective as pointed out in [1]. We can add more
> replication levels along the way.
>
> In this patch DDL replication is disabled by default and it can be
> enabled at different levels
> using the new PUBLICATION option 'ddl'. This option currently has two
> levels and are
> only allowed to be set if the PUBLICATION is FOR ALL TABLES.
>
> all: this option enables replication of all supported DDL commands.
> table: this option enables replication of Table DDL commands which include:
> -CREATE/ALTER/DROP TABLE
> -CREATE TABLE AS
>
> Example:
> Create a new publication with all ddl replication enabled:
> CREATE PUBLICATION pub1 FOR ALL TABLES with (ddl = 'all');
>
> Enable table ddl replication for an existing Publication:
> ALTER PUBLICATION pub2 SET (ddl = 'table');
>
> Also I break down ddl_deparse.c into two patches:
> 1.v60-0002-Functions-to-deparse-Table-DDL-commands.patch
> 2.v60-0003-Support-DDL-deparse-of-the-rest-commands.patch

Adding support for CREATE/ALTER/DROP Publication ddl deparsing.
The attached v61 patch has the changes for the same.

Regards,
Vignesh

Attachment Content-Type Size
v61-0001-Infrastructure-to-support-DDL-deparsing.patch text/x-patch 32.6 KB
v61-0002-Functions-to-deparse-Table-DDL-commands.patch text/x-patch 130.9 KB
v61-0005-DDL-messaging-infrastructure-for-DDL-replication.patch text/x-patch 41.5 KB
v61-0004-Introduce-the-test_ddl_deparse_regress-test-modu.patch text/x-patch 47.4 KB
v61-0003-Support-DDL-deparse-of-the-rest-commands.patch text/x-patch 196.1 KB
v61-0006-Support-DDL-replication.patch text/x-patch 210.9 KB
v61-0007-Document-DDL-replication-and-DDL-deparser.patch text/x-patch 40.6 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-01-13 10:25:02 Re: AW: [Extern] Re: postgres restore & needed history files
Previous Message David Rowley 2023-01-13 01:38:26 Re: Why is a hash join preferred when it does not fit in work_mem

Browse pgsql-hackers by date

  From Date Subject
Next Message Will Mortensen 2023-01-13 07:02:46 Re: Exposing the lock manager's WaitForLockers() to SQL
Previous Message Peter Smith 2023-01-13 06:19:58 Re: Perform streaming logical transactions by background workers and parallel apply