Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eekwa-00015o-1V for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jan 2018 17:04:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eekwZ-00071V-JJ for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jan 2018 17:04:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eekvd-0007fT-M3 for pgsql-hackers@lists.postgresql.org; Thu, 25 Jan 2018 17:03:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eekvW-00022l-9i for pgsql-hackers@lists.postgresql.org; Thu, 25 Jan 2018 17:03:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0PH2x52014525; Thu, 25 Jan 2018 12:02:59 -0500 From: Tom Lane To: "David G. Johnston" cc: "pgsql-hackers@lists.postgresql.org" Subject: Re: Further cleanup of pg_dump/pg_restore item selection code In-reply-to: References: <32668.1516848577@sss.pgh.pa.us> <4858.1516853858@sss.pgh.pa.us> Comments: In-reply-to "David G. Johnston" message dated "Wed, 24 Jan 2018 22:24:02 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14523.1516899779.1@sss.pgh.pa.us> Date: Thu, 25 Jan 2018 12:02:59 -0500 Message-ID: <14524.1516899779@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "David G. Johnston" writes: > Should pg_restore fail if asked to --create without a database entry in the > TOC? Yeah, I wondered about that too. This patch makes it a non-issue for archives created with v11 or later pg_dump, but there's still a hazard if you're restoring from an archive made by an older pg_dump. Is it worth putting in logic to catch that? Given the lack of field complaints, I felt fixing it going forward is sufficient, but there's room to argue differently. regards, tom lane