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 1nAY9m-00048T-0O for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Jan 2022 14:11:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nAY9k-0002hw-Lx for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Jan 2022 14:11:16 +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 1nAY9k-0002hn-Dt for pgsql-bugs@lists.postgresql.org; Thu, 20 Jan 2022 14:11:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAY9i-0004oG-DG for pgsql-bugs@lists.postgresql.org; Thu, 20 Jan 2022 14:11:16 +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 20KEBCTa856628; Thu, 20 Jan 2022 09:11:12 -0500 From: Tom Lane To: riina.piiroinen@op.fi cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17374: Bug in restore In-reply-to: <17374-33152d4618de991f@postgresql.org> References: <17374-33152d4618de991f@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 20 Jan 2022 09:25:32 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <856626.1642687872.1@sss.pgh.pa.us> Date: Thu, 20 Jan 2022 09:11:12 -0500 Message-ID: <856627.1642687872@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > While restoring backup-file to another schema, I got following error: > "pg_restore: could not execute query: ERROR "" already > exists. > Despite the error, the rows in the tables doubled. That sounds like the expected result if you try to restore over an existing table. Use --clean to drop and recreate the target tables. regards, tom lane