Re: Support logical replication of DDLs

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Zheng Li <zhengli10(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, rajesh(dot)rs0541(at)gmail(dot)com
Subject: Re: Support logical replication of DDLs
Date: 2022-03-21 08:13:34
Message-ID: CAFiTN-uuE9PiZK-zCTR2ch+Knb15js+=Ot1nKUMK5_5JVK4yrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, Mar 17, 2022 at 2:47 AM Zheng Li <zhengli10(at)gmail(dot)com> wrote:
>
> Hi,
>
> >If you don't mind, would you like to share the POC or the branch for this work?
>
> The POC patch is attached. It currently supports the following functionalities:

Thanks for sharing, I will look into it.

> >In such cases why don't we just log the table creation WAL for DDL
> >instead of a complete statement which creates the table and inserts
> >the tuple? Because we are already WAL logging individual inserts and
> >once you make sure of replicating the table creation I think the exact
> >data insertion on the subscriber side will be taken care of by the
> >insert WALs no?
>
> The table creation WAL and table insert WAL are available. The tricky
> part is how do we break down this command into two parts (a normal
> CREATE TABLE followed by insertions) either from the parsetree or the
> WALs. I’ll have to dig more on this.

I agree that this is a bit tricky, anyway I will also put more thoughts on this.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zheng Li 2022-03-21 20:56:54 Re: Support logical replication of DDLs
Previous Message Japin Li 2022-03-18 23:33:29 Re: Support logical replication of DDLs

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-03-21 08:29:16 Re: WIP: WAL prefetch (another approach)
Previous Message Michail Nikolaev 2022-03-21 07:58:23 Re: Patch proposal - parameter to limit amount of FPW because of hint bits per second