Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeMKb-0006ak-Ht for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jan 2018 14:47:17 +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 1eeMKb-0007g7-44 for pgsql-bugs@arkaria.postgresql.org; Wed, 24 Jan 2018 14:47:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eeMKa-0007fx-RU for pgsql-bugs@lists.postgresql.org; Wed, 24 Jan 2018 14:47:16 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eeMKY-0005a7-4g for pgsql-bugs@postgresql.org; Wed, 24 Jan 2018 14:47:15 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1eeMKV-00033h-MX; Wed, 24 Jan 2018 09:47:11 -0500 Date: Wed, 24 Jan 2018 09:47:11 -0500 From: Bruce Momjian To: "David G. Johnston" Cc: Frank van Vugt , "pgsql-bugs@postgresql.org" Subject: Re: minor annoyance - search_path not reset in/after dump/restore Message-ID: <20180124144711.GH17109@momjian.us> References: <3103514.ugGH0nFkBt@techfox> <20180124025130.GB17109@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Jan 23, 2018 at 08:45:24PM -0700, David G. Johnston wrote: > On Tuesday, January 23, 2018, Bruce Momjian wrote: > > The attached patch adds a RESET ALL to the end of the text dump to cause > a reset of all GUC variables.  Does this make sense to folks?  It would > only be applied to head, so it would only appear in PG 11.  > > > I'm inclined to take the position that if you are going to do something like > this you should decide how to proceed when the restore completes.  Adding \c or > RESET ALL immediately after that \i is straight-forward enough and at least in > the \c case you'd get the effects of any ALTER DATABASE SET commands in the > dump.  Now, usually I would place the \i itself in a file and not type it > interactively... > > While I cannot imagine anyone depending on the current behavior it does > encourage one to reconnect to the loaded database regardless of how the restore > happened. OK, agreed. A pg_dumpall restore will leave you in a different database. I will assume this item is closed. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +