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 1x51Q9-007ZJK-1v for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Sep 2026 13:36: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 1x51Q7-00F2i1-1T for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Sep 2026 13:35: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 1x51Q6-00F2ho-3D for pgsql-hackers@lists.postgresql.org; Fri, 11 Sep 2026 13:35:59 +0000 Received: from mail-pj2-x10.google.com ([2607:f8b0:4864:39::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 1x51Q4-000000058pT-1G1W for pgsql-hackers@postgresql.org; Fri, 11 Sep 2026 13:35:57 +0000 Received: by mail-pj2-x10.google.com with SMTP id d9443c01a7336-2d747ee1f38so7832705ad.2 for ; Fri, 11 Sep 2026 06:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1789133755; x=1789738555; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :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=Ylu2GO2iX6Oa7ZnCPDsboQxIxg0MoKyYSp1cemoHmFk=; b=fUne/WSGX/TBvxoUwFf+XQp1pmTwFu39T580LCxV5IThZn/zQ4mfFEV7uZvlJ4QvBv rXpwQedro7lz+J8djMVPJUX96mQ/5Z5fg5W2ATpckJz1gx81Fdjwftikj+HRSNVDBzTI jFA3gphQCm1CWt+G5jar2h9tHp2WOxfv6BLKw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789133755; x=1789738555; h=user-agent:in-reply-to:content-transfer-encoding :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=Ylu2GO2iX6Oa7ZnCPDsboQxIxg0MoKyYSp1cemoHmFk=; b=iOKtcwflnLbj6P8ZlxaIu3HyNFh8rd5HLPhMEr3NLe97VRgcvn4+VRvMG0e45wgrYm RtHJmOhRBorPDGKeD7lxRibAdf2RwYtc1cq6qifZWE8FXBKgj4MIMB/A/DI+PzfVD2qn HdvDmRk9Fos36mbAV0UH7s8H17Ta92XwTmsIGXKDIFG+uQ25unkYhfJU8NrTPWf7iNaL TMOkGNCMGQS78InYG7qUt+fCW7LT+kOc5EzA+D9qlx0urbnOCr67iNkw6rI0I+xikDxg ktU1VAhokiZisFwnYpCgWFsPa2OxK4IvMVKx9YAYppojoWmtfNlAdCh9sPKCPM/AfjIo UBxw== X-Forwarded-Encrypted: i=1; AKwUvBwEickQBNw43+VASttxVOl13L85bjcXO81xDyTVmGkoIq/2nX7bjwgcjyVg24U7C8qLVyBOoVLmFGfM+cbZ@postgresql.org X-Gm-Message-State: AFuF++nrzyzHmQY1xMNj4dHRW0zwwmycuoxVGEXnEOd08kNDsGAW2cQM Iy1+Tn4VGKdYmsCDTfIjsAbeRKcwz5wRq3vfHt6i36+YnXya75H/mWrB6SxDkf1gbQ== X-Gm-Gg: AYBFou1aX5DtzWWQLrxtCvRX8+QAhTdGw2IMAt0iBFzKtbWqO/8tL2wXC4CO4fAdM4X aSSqL8Wb9euvNBrBloRwuouAMNO/ccxd4boCmKx8dwtnUhW++3MQj9URvmFj6tmeIDKBfkaOlfB Fz5IkLYsea7BoQmsT6xwS7ZUba0eF9mYNfBYl6ysGjdYlJNzsqCXWcRv1ko5EYYwBzSfeMi0jtC mRVi/0alOT6dREYfgkcr96R7Gq3C7ADRvG8vMg+XTWv55qlLSAtyIchB/VplCLvn4Gn5KcjlFtN gXiKAq734evuezAe3gMhzavOcmFWWLvSeBWIhp3E7H1CFPmeDmmrZ/oPvrHDBJ5UcvoFFi7RXQC nOdu9LZSKG+Wkyit+nd+/QavElVjatSX2us44dbDEwVmPrMbqjKSXPHxQ7ZML3YqtUV0hUtGh4g 0qY++wUGswTAAMyUG1ojFZJkZyUPS1WHNTVIqOWqjD/puB6gofpv+gq0ceGHOA50QBeb4cFz5JQ beEy4dCa1oHMkb1L+trQJ1lcGkzLus= X-Received: by 2002:a17:902:ceca:b0:2d9:123c:8c49 with SMTP id d9443c01a7336-2dd2a346461mr69560405ad.14.1789133755151; Fri, 11 Sep 2026 06:35:55 -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 d9443c01a7336-2dd445de320sm856445ad.8.2026.09.11.06.35.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Sep 2026 06:35:54 -0700 (PDT) Date: Fri, 11 Sep 2026 06:35:52 -0700 From: Noah Misch To: Robert Haas Cc: Andrew Dunstan , 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: <20260911133552.42.noahmisch@microsoft.com> References: <20260827015242.54.noahmisch@microsoft.com> <20260909172132.0a.noahmisch@microsoft.com> <640139.1788975299@sss.pgh.pa.us> <20260910035953.59.noahmisch@microsoft.com> <20260911052649.e3.noahmisch@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Fri, Sep 11, 2026 at 08:24:50AM -0400, Robert Haas wrote: > On Fri, Sep 11, 2026 at 1:27 AM Noah Misch wrote: > > > I think we would do well to confine all of our present conversations, > > > insofar as it is possible to do so, to whether any given feature > > > contains defects incompatible with shipping it. > > > > The defects are the reason not to ship this implementation. One of those > > defects, the inability to restore in dependency order, cannot be fixed without > > redesigning the current SQL-facing API. That is the reason not to ship this > > design. See my original post of this thread for details. > > I saw that, but that seems like you're questioning the feature's > choice of scope as much as its actual merits. That is not the case. > I suppose the idea was > that this feature is for getting the definition of an individual > object for possible cloning into this database or some other where the > prerequisites are already present. If the feature had the intention of > allowing for full-database restoration and failed to do so, that's a > code defect. Otherwise, it isn't. The first discussion linked from the 76e514e commit message, [1], described the "main use case" as "dumping role definitions for migration or backup purposes without needing pg_dumpall". My review findings are about failures that arise when using the feature as part of a migration. [1] https://postgr.es/m/4c5f895e-3281-48f8-b943-9228b7da6471@gmail.com