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 1kgqdb-0005p1-KY for pgsql-bugs@arkaria.postgresql.org; Sun, 22 Nov 2020 14:46:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kgqd3-00085v-PO for pgsql-bugs@arkaria.postgresql.org; Sun, 22 Nov 2020 14:46:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgqd3-00085n-4x for pgsql-bugs@lists.postgresql.org; Sun, 22 Nov 2020 14:46:13 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgqcf-0005DE-Un for pgsql-bugs@lists.postgresql.org; Sun, 22 Nov 2020 14:46:12 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 4D63B5C0132; Sun, 22 Nov 2020 09:45:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 22 Nov 2020 09:45:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=hODClpi6+4SCUvJok wZw/cAm9gO9gv2U3nZf8YZdLKE=; b=QvahiYkQMSHmf/9y3eAR8F7JHHxom9izO n9jT+jUm5nJgor96kxwIM6/vqfVzVxdCAOHDGfhJvZp6UJw+qYx9fUtpmAlWLorw f241MnxH6i72iRERAe0YN7EFu2B+elyXdNAzGrCfZLMan7wxVusJf/svmahvv3hK EiNlsc8c+0ReD/AoDgHxuETrCZdaWL5GT3yniOblFcJkgPgDqs57vQfaDtUV6qsx xPhLI7fve6kNrOH/BVPX/kC2otCMBvdu4vvANZqC39GyEpMw2e/40LK55lXapj0s HiWq7G02njgdPuVvzXrnPDFIojKfqHrHFPsdoEpFIkpjw2bC87OBA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeggedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggujggfsehttdertddtredvnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeevgfelveegueejgefhgeetgefhgeehieefheehleetteei udeiiefhgffgheffteenucfkphepudeltddrleehrddukedrjeelnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhv hhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.18.79]) by mail.messagingengine.com (Postfix) with ESMTPA id D06A63280063; Sun, 22 Nov 2020 09:45:37 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id BA18B2A14F1; Sun, 22 Nov 2020 11:45:34 -0300 (-03) Date: Sun, 22 Nov 2020 11:45:34 -0300 From: Alvaro Herrera To: Zsolt Ero Cc: Tom Lane , "David G. Johnston" , PostgreSQL mailing lists Subject: Re: BUG #16732: pg_dump creates broken backups Message-ID: <20201122144534.GA22488@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Nov-22, Zsolt Ero wrote: > Can you help me how can I do this? > > Here is what I was doing before, which triggered the bug: > > pg_restore --schema-only --format=custom --single-transaction $BACKUP_FILE > > pg_restore --list $BACKUP_FILE > dump_list.full > grep -v "public events_map" dump_list.full > dump_list.main > > pg_restore --data-only --format=custom --use-list=dump_list.main --jobs=4 > $BACKUP_FILE I'd do this: pg_restore --list $BACKUP_FILE | grep -v "TABLE DATA public events_map" > dump_list pg_restore -j4 --use_list=dump_list $BACKUP_FILE