Re: file cloning in pg_upgrade and CREATE DATABASE

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: file cloning in pg_upgrade and CREATE DATABASE
Date: 2018-10-10 19:50:02
Message-ID: 20181010195002.GA7806@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 <bruce(at)momjian(dot)us> 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 +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-10-10 19:55:33 Re: Postgres 11 release notes
Previous Message pgsql 2018-10-10 18:31:35 Question about resource owners