Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erQs5-000382-4Y for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 16:15:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erQs3-0005hN-V1 for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 16:15:51 +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.89) (envelope-from ) id 1erQs3-0005hD-Jt for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 16:15:51 +0000 Received: from eastrmfepo103.cox.net ([68.230.241.215]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erQrx-0004XW-2R for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 16:15:50 +0000 Received: from eastrmimpo109.cox.net ([68.230.241.222]) by eastrmfepo103.cox.net (InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id <20180301161543.ZPOZ22712.eastrmfepo103.cox.net@eastrmimpo109.cox.net> for ; Thu, 1 Mar 2018 11:15:43 -0500 Received: from [192.168.1.10] ([70.171.109.83]) by eastrmimpo109.cox.net with cox id GgFi1x01K1o04Vy01gFjuN; Thu, 01 Mar 2018 11:15:43 -0500 X-Authority-Analysis: v=2.2 cv=bLhmGL2Z c=1 sm=1 tr=0 a=uCHdjGDeLqaieW9t8IbZ6A==:117 a=uCHdjGDeLqaieW9t8IbZ6A==:17 a=x7bEGLp0ZPQA:10 a=T11QR6bd6vIA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=kviXuzpPAAAA:8 a=R9WUHDjxA-4GGAE8yZEA:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=QdQJ4b0TsC5jHwKWwrwA:9 a=KdFaXmptFnNb4tNl:21 a=_W_S_7VecoQA:10 a=qrIFiuKZe2vaD64auk6j:22 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (PLAIN) smtp.auth=ron.l.johnson@cox.net Subject: Re: Version upgrade: is restoring the postgres database needed? To: pgsql-general@lists.postgresql.org References: <30fe4b25-14b1-4408-c3bf-f40c2299465f@cox.net> From: Ron Johnson Message-ID: <9636317b-d071-e830-af31-c532f9572aa4@cox.net> Date: Thu, 1 Mar 2018 10:15:42 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------6FE506041C7851D017516420" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------6FE506041C7851D017516420 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 03/01/2018 08:46 AM, Melvin Davidson wrote: > > > On Thu, Mar 1, 2018 at 5:24 AM, Ron Johnson > wrote: > > > Or do we just apply the globals.sql created by "pg_dumpall > --globals-only"? > > (We're upgrading by restoring all databases on a new server, that, > naturally, has it's own new postgres, template0 and template1 databases.) > > > >is restoring the postgres database needed? > > That would depend on how you did the dump. If you did a_complete > pg_dumpall (did not use -g or any other limiting flags), then all roles > and databases are contained > in the output file created. NOTE: restoring from the dumped file will > require rebuilding all indexes, because indexes are not dumped. No, I do: $ pg_dump -Fc PROD > PROD.pgdump $ pg_dump --globals-only postgres > globals.sql $ pg_dump -Fc postgres > postgres.pgdump -- Angular momentum makes the world go 'round. --------------6FE506041C7851D017516420 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 03/01/2018 08:46 AM, Melvin Davidson wrote:


On Thu, Mar 1, 2018 at 5:24 AM, Ron Johnson <ron.l.johnson@cox.net> wrote:

Or do we just apply the globals.sql created by "pg_dumpall --globals-only"?

(We're upgrading by restoring all databases on a new server, that, naturally, has it's own new postgres, template0 and template1 databases.)


>is restoring the postgres database needed?

That would depend on how you did the dump. If you did a_complete pg_dumpall (did not use -g or any other limiting flags), then all roles and databases are contained
in the output file created. NOTE: restoring from the dumped file will require rebuilding all indexes, because indexes are not dumped.

No, I do:

$ pg_dump -Fc PROD > PROD.pgdump
$ pg_dump --globals-only postgres > globals.sql
$ pg_dump -Fc postgres > postgres.pgdump



--
Angular momentum makes the world go 'round.
--------------6FE506041C7851D017516420--