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 1kgX8n-0000bp-14 for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Nov 2020 17:57:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kgX8l-0002ic-At for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Nov 2020 17:57:39 +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 1kgX8l-0002hT-3m for pgsql-bugs@lists.postgresql.org; Sat, 21 Nov 2020 17:57:39 +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 1kgX8j-0003GV-2g for pgsql-bugs@lists.postgresql.org; Sat, 21 Nov 2020 17:57:38 +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 0ALHvXBI1546650; Sat, 21 Nov 2020 12:57:33 -0500 From: Tom Lane To: Alvaro Herrera cc: Zsolt Ero , "David G. Johnston" , PostgreSQL mailing lists Subject: Re: BUG #16732: pg_dump creates broken backups In-reply-to: <20201121170638.GA10288@alvherre.pgsql> References: <20201121170638.GA10288@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Sat, 21 Nov 2020 14:06:38 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1546648.1605981453.1@sss.pgh.pa.us> Date: Sat, 21 Nov 2020 12:57:33 -0500 Message-ID: <1546649.1605981453@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Why do you do that? It seems much easier to produce a complete dump, > then obtain the --list from it, do "grep -v" of the TABLE DATA element > for that table, then give that file to pg_restore. It would restore > everything in the right order, including that table's definition, but > excluding that table's data. Yeah, it's clearly possible to dodge the issue by using a different dump/restore procedure. Still, this procedure is not obviously incorrect, so it'd be nice if pg_restore coped better. regards, tom lane