Re: Support logical replication of DDLs

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, 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>, 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-16 19:38:27
Message-ID: 20230216193827.h4p6dtjg244ox5fj@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 2023-Feb-16, Jonathan S. Katz wrote:

> On 2/16/23 12:53 PM, Alvaro Herrera wrote:

> > I don't think this is the fault of logical replication. Consider that
> > for the backend server, the function source code is just an opaque
> > string that is given to the plpgsql engine to interpret. So there's no
> > way for the logical DDL replication engine to turn this into runnable
> > code if the table name is not qualified.
>
> Sure, that's fair. That said, the example above would fall under a "typical
> use case", i.e. I'm replicating functions that call tables without schema
> qualification. This is pretty common, and as logical replication becomes
> used for more types of workloads (e.g. high availability), we'll definitely
> see this.

Hmm, I think you're saying that replay should turn check_function_bodies
off, and I think I agree with that.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2023-02-16 19:41:53 Re: Automatic aggressive vacuum on almost frozen table takes too long
Previous Message Adrian Klaver 2023-02-16 19:29:52 Re: Vacuum full issue

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonathan S. Katz 2023-02-16 19:43:16 Re: Support logical replication of DDLs
Previous Message Andreas 'ads' Scherbaum 2023-02-16 19:36:37 Re: Make ON_ERROR_STOP stop on shell script failure