Re: Support logical replication of DDLs

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Zheng Li <zhengli10(at)gmail(dot)com>, 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-04-07 10:19:10
Message-ID: CAA4eK1LC=K7vqBBPGUovYJ9voqmf2-nEcpfonO10weAJQhob4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Tue, Mar 29, 2022 at 9:47 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Thu, Mar 24, 2022 at 11:24 PM Zheng Li <zhengli10(at)gmail(dot)com> wrote:
> >
> >
> > Good catch. The reason for having isTopLevel in the condition is
> > because I haven't decided if a DDL statement inside a PL should
> > be replicated from the user point of view. For example, if I execute a
> > plpgsql function or a stored procedure which creates a table under the hood,
> > does it always make sense to replicate the DDL without running the same
> > function or stored procedure on the subscriber? It probably depends on
> > the specific
> > use case. Maybe we can consider making this behavior configurable by the user.
>
> But then this could be true for DML as well right? Like after
> replicating the function to the subscriber if we are sending the DML
> done by function then what's the problem in DDL. I mean if there is
> no design issue in implementing this then I don't think there is much
> point in blocking the same or even providing configuration for this.
>

Valid point. I think if there are some design/implementation
constraints for this then it is better to document those(probably as
comments).

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2022-04-07 10:44:56 Re: Reg. GET STACKED DIAGNOSTICS values to be stored in a single variable
Previous Message Amit Kapila 2022-04-07 10:16:32 Re: Support logical replication of DDLs

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-04-07 10:27:54 Re: Skipping logical replication transactions on subscriber side
Previous Message Amit Kapila 2022-04-07 10:16:32 Re: Support logical replication of DDLs