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 1x4VxA-007DJy-2f for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2026 04:00:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4Vx9-0021bY-2W for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2026 03:59:59 +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 1x4Vx9-0021bA-1M for pgsql-hackers@lists.postgresql.org; Thu, 10 Sep 2026 03:59:59 +0000 Received: from mail-pz2-x10.google.com ([2607:f8b0:4864:3b::10]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x4Vx7-00000004t63-0drI for pgsql-hackers@postgresql.org; Thu, 10 Sep 2026 03:59:58 +0000 Received: by mail-pz2-x10.google.com with SMTP id 41be03b00d2f7-cc4ae61629fso364175a12.2 for ; Wed, 09 Sep 2026 20:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1789012796; x=1789617596; darn=postgresql.org; h=user-agent:in-reply-to:content-disposition:content-type :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=J8knyEoBcNPQwPV4T1+5zI8dozgtbcnT5iQYkACEX0Q=; b=YUlUxVzQkWE+b/D3GKZAGQeGJgngdxCUD9y9B4HNi+ejjDGrryuS9eL3ARJxxcl78F kJutOTlAy7IuQaS3t80kDDXrjLnoJP7q5e0/bweMXasazQ3VyoIwknwNfcWx27u2y50n uY7aPRO+CLV56oEFxC/oQiKdGPt9mkk37uDA0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789012796; x=1789617596; h=user-agent:in-reply-to:content-disposition:content-type :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=J8knyEoBcNPQwPV4T1+5zI8dozgtbcnT5iQYkACEX0Q=; b=Lz2Vx+L9fvfqcP2NoZxBt+FZUCxqa4+djkB9zdlSF9Qxlz1hH77qq/Q4EgZeuxz72/ 0nYS/1j0ajQD18/kFN3cYF+oxdt/fyZEZM/kmwuEC/0VeB0FbpAD86s7RuICBUYaP1Gf YIAgZRL/fd5HvXe+1DnfNIV1tevH4eWuCKp7A//j733Sgs3kesffbjyC9ve+7oBVPrHu YvUUZz3lwJ4uKHCwUKHB56JdHREuyxsAAFX9mE3UqUDldp69Qa6nCJf4y4UTFOua/5kZ NANLqpR89npJElZ29BVE3CkIkDXHZBRzrBNfFQxm6eHKNzYEoQ9LEf3QL9YvOvJph8o2 JetA== X-Forwarded-Encrypted: i=1; AKwUvByXJSM+1mED18R74LchWNig0HqhIqq6KrL1aOZ5isDjHZKEu5e+x7T4QHvNIRpa/5G4Hx/B8im4tY0BRU5V@postgresql.org X-Gm-Message-State: AFuF++mPZ9GD7axvgr5J9U5FqFZznfCrKd2JV/dy3WV3ii0kROMcHs15 KExxWxK9i+YCEgQHfYR4rRLbyl8Ivqk16LZPHlauHz3E2xyBquSbyw1suCN75KgfFg== X-Gm-Gg: AYBFou1TrG91Su67lCGpkc2cKWPzd7vKbADBW0oODvni8vmzpjyj31rdw0XAr1adz6c W2AiYCR2NVhPTnEwD7MS84pqMi//OpEHnZQyxk7yFT5ymW2xraSCUt48RNC5ZyvqARJPzchQ78c 4SQFsaTNHlqwCopdvRKewhq8RIl5ZT0wrmDqI95VjW2f1r5CHnOyX+lEbfF3LwhcWLqcC9z3p14 LFKyMUqSlDU1nkABSKxOSRv9VMMZE6A5Dx4ub4sBUUUB+KpBJRozpEiinhRMzX34O7HheZBHiI4 Kt+rJe86fgi/y/q/U+Tbhq3/Ctq4zfHhV9Ah23PEsi7SZHNV+Eq7AT2ZjtSWbSH5GUx/af6A7Vu bdE/jGqvRzlGkvoaI1lzr7qEF0zB5FSD70ipjrTBBz2TFnvRBFVIQ5KNqFujYMUSPJKZa4QQav8 WmyevQagoLzWgZAC6ioCT2+MhaMqlT7v01BSddiAYsBWg2upzdf3jHPeEB7skO3QJqrXKyLHV8O fdlkmfy9XZe4c/KvEes4q+bGCPI61I= X-Received: by 2002:a17:90b:2b48:b0:398:dcf6:d40e with SMTP id 98e67ed59e1d1-39d70bb1bc4mr8897570a91.17.1789012796021; Wed, 09 Sep 2026 20:59:56 -0700 (PDT) Received: from microsoft.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-333c9db92b1sm48642533eec.9.2026.09.09.20.59.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2026 20:59:55 -0700 (PDT) Date: Wed, 9 Sep 2026 20:59:53 -0700 From: Noah Misch To: Andrew Dunstan Cc: Tom Lane , Melanie Plageman , gonzalemario@gmail.com, dbryan.green@gmail.com, euler@eulerto.com, pgsql-hackers@postgresql.org Subject: Re: pg_get_*_ddl() needs a redesign Message-ID: <20260910035953.59.noahmisch@microsoft.com> References: <20260827015242.54.noahmisch@microsoft.com> <20260909172132.0a.noahmisch@microsoft.com> <640139.1788975299@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.3.0 (2026-01-25) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Sep 09, 2026 at 03:12:26PM -0400, Andrew Dunstan wrote: > On 2026-09-09 We 1:34 PM, Tom Lane wrote: > > Noah Misch writes: > > > I want to clarify one thing before you spend much time on fixes. I don't see > > > "fixes" addressing this thread as a whole, unless you plan to dispute the > > > premise that the feature needs a redesign. In other words, I think the thread > > > outcome should be one of these: > > > - My review erred in determining that the feature needs a redesign. The > > > design is sound and should proceed, possibly with some fixes. > > > - Revert the feature. > > FWIW, I agree with Noah's point that having two independent > > implementations of SQL reverse compilation is not really a place > > we want to be: it will be a major PITA for future development. > > > > Unfortunately, I see no practical way to have pg_dump share code with > > the backend for most of this stuff; not least because pg_dump has to > > support dumping from old backends that won't have any such feature. > > So we either swallow that duplication or decide that we're never > > going to support this in the backend. Neither choice is palatable, > > but I don't think I want to be forced into the duplicative approach > > when we've not explored other alternatives (such as refactoring > > pg_dump to expose its internal logic in some way). > > > > > > > I first raised the idea of these functions on the mailing list in July 2025, > although the idea was much older. [1] Among other things, you (Tom) said > [2]: > > Insisting that this feature support pg_dump is a good way > of making sure that nothing useful will emerge at all. > > Concrete patches began to appear around October and November 2025. I don't recall anyone coming along and saying "No, we don't want to do that." After they were committed there were various comments on the way they were done, and I addressed them. Now, months later, we are more or less told that this whole enterprise has been misguided from the start. Is it any wonder that people often find the process of contributing to Postgres discouraging? And that would include people who have been working on more important members of this set for release 20, particularly the one that most people want, namely pg_get_table_ddl() that Akshay has been working on. I don't feel badly for myself, but I do feel badly for the contributors. Going forward, feel free to add me to the To: line of a mailing list post and explicitly ask me for my guess about the project's overall prognosis, likely ways of failing, etc. My guess may be brief and/or wrong, but I'll provide one. When it's four months after feature freeze and I find non-subtle, unreported defects in the feature, the development process wasn't adequate for the subject matter. To be transparent, observing this outcome changed my view of code duplication. Duplication was always a smell, but it seemed like a plausible compromise tactic in 2025. Now I find the duplication gave wrong code too much place to hide. > I believe reverting now almost certainly means this proposal or anything like it is probably dead for the foreseeable future. I'm prepared to accept that outcome.