Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDBcH-00080n-Vk for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Jun 2016 14:16:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bDBcH-0007QZ-Dk for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Jun 2016 14:16:25 +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 1bDBcG-0007QH-NT for pgsql-bugs@postgresql.org; Wed, 15 Jun 2016 14:16:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bDBcA-0005c5-Mj for pgsql-bugs@postgresql.org; Wed, 15 Jun 2016 14:16:23 +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 u5FEGEdP018196; Wed, 15 Jun 2016 10:16:14 -0400 From: Tom Lane To: buschmann@nidsa.net cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db In-reply-to: <20160615082714.5798.25003@wrigleys.postgresql.org> References: <20160615082714.5798.25003@wrigleys.postgresql.org> Comments: In-reply-to buschmann@nidsa.net message dated "Wed, 15 Jun 2016 08:27:14 -0000" Date: Wed, 15 Jun 2016 10:16:14 -0400 Message-ID: <18195.1466000174@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org buschmann@nidsa.net writes: > On the origin database I had entered > ALTER DATABASE xxxdb SET search_path TO public,partition2; > The restore omits setting the search path, it must be entered again with > ALTER DATABASE on the target machine. This is operating as designed: pg_dump dumps the content of a database, not settings attached to the database object as such. You can use pg_dumpall (possibly with the -g switch) to capture that info. There've been repeated discussions about refactoring this division of labor, but nothing's been agreed to yet. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs