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 1m1HwT-000590-Ue for pgsql-general@arkaria.postgresql.org; Thu, 08 Jul 2021 00:31:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1HwR-0003Au-Sw for pgsql-general@arkaria.postgresql.org; Thu, 08 Jul 2021 00:30:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1HwR-0003Am-Ik for pgsql-general@lists.postgresql.org; Thu, 08 Jul 2021 00:30:59 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1HwL-0008Fy-6J for pgsql-general@lists.postgresql.org; Thu, 08 Jul 2021 00:30:58 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1m1HwJ-0002DM-FT; Wed, 07 Jul 2021 20:30:51 -0400 Date: Wed, 7 Jul 2021 20:30:51 -0400 From: Bruce Momjian To: Luca Ferrari Cc: Peter Eisentraut , pgsql-general Subject: Re: pg_upgrade as a way of cloning an instance? Message-ID: <20210708003051.GA1173@momjian.us> References: <8ba0ee71-063d-112b-66dc-2971456f8a8a@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 7, 2021 at 10:30:15AM +0200, Luca Ferrari wrote: > On Wed, Jul 7, 2021 at 10:22 AM Peter Eisentraut > wrote: > > Yeah, seems pretty pointless. You can just copy the data directory > > directly and get the same effect. pg_upgrade basically does a data > > directory copy plus some extra stuff to convert the system catalogs > > between versions, and if you don't need that second part, you might as > > well do the first part directly. > > > Agree on everything, but I was curious, since users sometime find ways > to do things that are almost insane! Also, pg_upgrade will throw an error if copying from one version to the same version if there are tablespaces since the tablespace directory name is the catalog version name. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.