Re: Support logical replication of DDLs

From: Ajin Cherian <itsajin(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Zheng Li <zhengli10(at)gmail(dot)com>, li jie <ggysxcq(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, "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-02-06 07:07:40
Message-ID: CAFPTHDZpRUnRktDC3FrMcD_PBBmD8-Fd+0og6NP2mabqXqKF1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Sat, Feb 4, 2023 at 12:27 AM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
>
> There's a bug in this patch, where if there are multiple publications
> that publish ddls,
> then multiple event triggers will write multiple WAL records.
> This will result in duplicate ddls statements being published.
> This will also create multiple WAL records.
> To avoid this,
> I've added a fix in event_trigger invoking logic
> (EventTriggerCommonSetup()) patch-6,
> to check for duplicate publication ddl deparsing event trigger functions
> and if there are duplicates, only the first event trigger function is
> invoked and the rest ignored.
> This way, even if there are multiple publications that publish ddls,
> then only one set
> event trigger functions are invoked.
>

This patch caused a test case failure. Fixing this.

regards,
Ajin Cherian
Fujitsu Australia

Attachment Content-Type Size
v65-0001-Infrastructure-to-support-DDL-deparsing.patch application/octet-stream 37.3 KB
v65-0002-Functions-to-deparse-Table-DDL-commands.patch application/octet-stream 130.9 KB
v65-0005-DDL-messaging-infrastructure-for-DDL-replication.patch application/octet-stream 41.2 KB
v65-0004-Introduce-the-test_ddl_deparse_regress-test-modu.patch application/octet-stream 47.4 KB
v65-0003-Support-DDL-deparse-of-the-rest-commands.patch application/octet-stream 198.6 KB
v65-0006-Support-DDL-replication.patch application/octet-stream 212.0 KB
v65-0007-Document-DDL-replication-and-DDL-deparser.patch application/octet-stream 40.6 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marcos Pegoraro 2023-02-06 11:20:17 Understanding years part of Interval
Previous Message Richard Brockie 2023-02-06 03:58:41 Re: Slow down dev database transactions/second for testing?

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-02-06 07:23:02 Re: Fix GUC_NO_SHOW_ALL test scenario in 003_check_guc.pl
Previous Message Takamichi Osumi (Fujitsu) 2023-02-06 07:05:56 RE: Time delayed LR (WAS Re: logical replication restrictions)