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 1pWhdn-00061d-MT for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Feb 2023 17:50:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pWhdm-00089i-Kn for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Feb 2023 17:50:22 +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 1pWhdm-00089Y-8p for pgsql-hackers@lists.postgresql.org; Mon, 27 Feb 2023 17:50:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pWhdj-0007FE-Vw for pgsql-hackers@lists.postgresql.org; Mon, 27 Feb 2023 17:50:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 31RHoF78389893; Mon, 27 Feb 2023 12:50:15 -0500 From: Tom Lane To: Robert Haas cc: Andrew Dunstan , Alvaro Herrera , David Rowley , Peter Geoghegan , pgsql-hackers@lists.postgresql.org, Andrew Subject: Re: pg_dump versus hash partitioning In-reply-to: References: <1376149.1675268279@sss.pgh.pa.us> <1412538.1675283692@sss.pgh.pa.us> <1425446.1675291093@sss.pgh.pa.us> <1440373.1675299790@sss.pgh.pa.us> <1533086.1675349554@sss.pgh.pa.us> <1912821.1676402493@sss.pgh.pa.us> <369734.1677514834@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 27 Feb 2023 12:02:03 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <389891.1677520215.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 27 Feb 2023 12:50:15 -0500 Message-ID: <389892.1677520215@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Mon, Feb 27, 2023 at 11:20 AM Tom Lane wrote: >> Well, that's a user error not pg_dump's fault. Particularly so for hash >> partitioning, where there is no defensible reason to make the partitions >> semantically different. > I am still of the opinion that you're going down a dangerous path of > redefining pg_dump's mission from "dump and restore the database, as > it actually exists" to "dump and restore the database, unless the user > did something that I think is silly". Let's not attack straw men, shall we? I'm defining pg_dump's mission as "dump and restore the database successfully". Failure to restore does not help anyone, especially if they are in a disaster recovery situation where it's not possible to re-take the dump. It's not like there's no precedent for having pg_dump tweak things to ensure a successful restore. regards, tom lane