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 1pbRuC-0003KS-KQ for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Mar 2023 20:02:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pbRuB-0008F0-A8 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Mar 2023 20:02:55 +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 1pbRuB-0008Er-0i for pgsql-hackers@lists.postgresql.org; Sun, 12 Mar 2023 20:02:55 +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 1pbRu4-0003sL-FM for pgsql-hackers@lists.postgresql.org; Sun, 12 Mar 2023 20:02:54 +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 32CK2hB21604683; Sun, 12 Mar 2023 16:02:43 -0400 From: Tom Lane To: Justin Pryzby cc: Julien Rouhaud , Andrew Dunstan , Alvaro Herrera , David Rowley , Peter Geoghegan , Robert Haas , pgsql-hackers@lists.postgresql.org, Andrew Subject: Re: pg_dump versus hash partitioning In-reply-to: References: <1425446.1675291093@sss.pgh.pa.us> <1440373.1675299790@sss.pgh.pa.us> <1533086.1675349554@sss.pgh.pa.us> <1912821.1676402493@sss.pgh.pa.us> <20230311030154.pg63uspio35h4a6t@jrouhaud> <1078804.1678504214@sss.pgh.pa.us> <20230311033232.g6jgkuzxdawepsbe@jrouhaud> <1602203.1678650412@sss.pgh.pa.us> Comments: In-reply-to Justin Pryzby message dated "Sun, 12 Mar 2023 14:54:50 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1604681.1678651363.1@sss.pgh.pa.us> Date: Sun, 12 Mar 2023 16:02:43 -0400 Message-ID: <1604682.1678651363@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > On Sun, Mar 12, 2023 at 03:46:52PM -0400, Tom Lane wrote: >> What I propose we do about that is further tweak things so that >> load-via-partition-root forces dumping via COPY. AFAIK the only >> compelling use-case for dump-as-INSERTs is in transferring data >> to a non-Postgres database, which is a context in which dumping >> partitioned tables as such is pretty hopeless anyway. (I wonder if >> we should have some way to dump all the contents of a partitioned >> table as if it were unpartitioned, to support such migration.) > I think that what this other thread is about. > https://commitfest.postgresql.org/42/4130/ > pg_dump all child tables with the root table As far as I understood (didn't actually read the latest patch) that one is just about easily selecting all the partitions of a partitioned table when doing a selective dump. It's not helping you produce a non-Postgres-specific dump. Although I guess by combining load-via-partition-root, data-only mode, and dump-as-inserts you could produce a clean collection of non-partition-dependent INSERT commands ... so maybe we'd better not force dump-as-inserts off. I'm starting to like the te->defn hack more. regards, tom lane