Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vqeuu-00FHk4-2S for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Feb 2026 22:12:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vqeus-00BYph-0H for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Feb 2026 22:12:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vqeur-00BYpY-2K for pgsql-hackers@lists.postgresql.org; Thu, 12 Feb 2026 22:12:06 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vqeup-00000000Lst-3Ikf for pgsql-hackers@lists.postgresql.org; Thu, 12 Feb 2026 22:12:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2026010100; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=hiw8h/CmhEXZhPW7bmW8MH9ERFK06yP778gH4kw9dQY=; b=Sh1WiJC6IwOEJm0H+iXUr8Nom6 APfE1Fw1UzUcS4iDOn2yS5IjuoTmE3RQDKBrOiPS29wgCQPwZi+wjuKwGYTBRVpTv0IW75zHDYgg4 PQM84/uvKdGyG+zfMkgrrN82byz5y45PzQKfULGLYyhGr7pHvh8owGJ0R+eDjJ0dV1j2hB9bStl+L GDYkbPzdUvjU0OpwsL7ibRYF8qn3V9WV7w12mQqRS4/YSX5X/cg2FUKELIoMEV8ylbVQZwzsRGrr3 zwdN4ZcXGPyLxACkzQE3+MN8c7eR4M1NnrfT/LFw31VZ+mhyca3qQPau/maUmVxiBuVtvOlSa1jwh 1dSZu2EA==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1vqeuo-00000001FW7-3THT; Thu, 12 Feb 2026 17:12:02 -0500 Date: Thu, 12 Feb 2026 17:12:02 -0500 From: Bruce Momjian To: Masahiko Sawada Cc: Vitaly Davydov , pgsql-hackers@lists.postgresql.org Subject: Re: Support logical replication of DDLs Message-ID: References: <080f9394-c127-4cef-865e-10f2f997125c@postgrespro.ru> 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 Wed, Feb 4, 2026 at 04:39:38PM +0900, Masahiko Sawada wrote: > On Tue, Feb 3, 2026 at 1:04 AM Vitaly Davydov wrote: > > 4. Another option is to create json/ddl-sql from system catalog changes without > > an intermediate representation, but, anyway, when we interpret system catalog > > changes we have to temporary save current data in some structures. Parsenodes > > is the already existing solution for it. > > IIUC, one of the main challenges of the "deparsing DDL parse tree" > idea is the maintenance burden. If we implement logic to deparse parse > nodes back to SQL text, we would end up updating that deparsing code > every time the underlying parse node definition changes (which happens > frequently in internal structures). This introduces a substantial and > ongoing maintenance cost. I agree maintenance is the big blocker, but the maintenance is two parts: 1. writing the patch to adjust for new features in each major release 2. testing the patch People create some strange database schemas, so testing will be difficult. pg_upgrade had a similar challenge, and I found that pushing as much of the changes _out_ of pg_upgrade and to other parts of the system, e.g,, pg_dump, was a big help. I am not sure if that is possible for replicated DDL, but if it is, I would pursue it. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.