Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSk5U-0001L9-RG for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 19:38:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSk5T-0006I1-B2 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 19:38:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSk5T-0006Hs-1G for pgsql-hackers@lists.postgresql.org; Thu, 16 Feb 2023 19:38:35 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSk5Q-0001os-L0 for pgsql-hackers@lists.postgresql.org; Thu, 16 Feb 2023 19:38:34 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 531CA320016F; Thu, 16 Feb 2023 14:38:30 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 16 Feb 2023 14:38:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1676576309; x=1676662709; bh=U WDnKz2pVK1FYb+Ikn425guwl+e25c2UQFE9zQpjB0Q=; b=dO3RJaVNALcvGlOPT YGzDs8x6lbdehmGWniAqVYSNtP+VpIQMcNJDwZszn4F+iFLVK0CCDYbraRiXnlRu anL55t0Vj8t3SA87UYDcDn9OE1X1H4Z3LdF7xDE3+IHgGe6pykbInoJJ0TJjtdDu 2SNSzDqnJRthMcRm++6o+t6qTZGBQWD3EFX2ygXpzz/lEIt2HBjwMm2WRSl5hJ8h ZllRrpHmfzuvpeqLvZBNcanDwCofjDHmjr6XyWMSeqEZX1Pq5gbqFXUgelfy0Gj/ vCIX0sdpl0h5N85e9KSenCWK8UqlfbmZIgjVI3YuHThWp9hjA9Mgf5G2j6bSaX18 V0K1g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeijedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeej keffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Feb 2023 14:38:29 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 37C089E; Thu, 16 Feb 2023 20:38:27 +0100 (CET) Date: Thu, 16 Feb 2023 20:38:27 +0100 From: Alvaro Herrera To: "Jonathan S. Katz" Cc: "houzj.fnst@fujitsu.com" , Amit Kapila , Ajin Cherian , Peter Smith , vignesh C , Zheng Li , li jie , Dilip Kumar , Masahiko Sawada , Japin Li , rajesh singarapu , PostgreSQL Hackers Subject: Re: Support logical replication of DDLs Message-ID: <20230216193827.h4p6dtjg244ox5fj@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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)