Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAKUk-0005Y5-QF for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Oct 2018 19:50:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAKUi-0001Wz-R5 for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Oct 2018 19:50:08 +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.89) (envelope-from ) id 1gAKUi-0001Wr-Jr for pgsql-hackers@lists.postgresql.org; Wed, 10 Oct 2018 19:50:08 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gAKUf-0006l6-Lg for pgsql-hackers@postgresql.org; Wed, 10 Oct 2018 19:50:08 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1gAKUc-0000IF-6I; Wed, 10 Oct 2018 15:50:02 -0400 Date: Wed, 10 Oct 2018 15:50:02 -0400 From: Bruce Momjian To: Alvaro Herrera Cc: Michael Paquier , Peter Eisentraut , pgsql-hackers Subject: Re: file cloning in pg_upgrade and CREATE DATABASE Message-ID: <20181010195002.GA7806@momjian.us> References: <20181003014409.GC2609@paquier.xyz> <20181003020706.hykmk4vmy6brovoj@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181003020706.hykmk4vmy6brovoj@alvherre.pgsql> 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, Oct 2, 2018 at 11:07:06PM -0300, Alvaro Herrera wrote: > On 2018-Oct-03, Michael Paquier wrote: > > > On Tue, Oct 02, 2018 at 10:35:02PM -0300, Alvaro Herrera wrote: > > > I'm not clear what interface are you proposing. Maybe they would just > > > use the clone-or-fail mode, and note whether it fails? If that's not > > > it, please explain. > > > > Okay. What I am proposing is to not have any kind of automatic mode to > > keep the code simple, with a new option called --transfer-mode, able to > > do three things: > > - "link", which is the equivalent of the existing --link. > > - "copy", the default and the current behavior, which copies files. > > - "clone", the new mode proposed in this thread. > > I see. Peter is proposing to have a fourth mode, essentially > --transfer-mode=clone-or-copy. Uh, if you use --link, and the two data directories are on different file systems, it fails. No one has ever asked for link-or-copy, so why are we considering clone-or-copy? Are we going to need link-or-clone-or-copy too? I do realize that clone and copy have non-destructive behavior on the old cluster once started, so it does make some sense to merge them, unlike link. -- 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 +