Re: file cloning in pg_upgrade and CREATE DATABASE

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

On 10/10/2018 21:50, Bruce Momjian wrote:
>> 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.

I'm OK to get rid of the clone-or-copy mode. I can see the confusion.

The original reason for this behavior was that the Linux implementation
used copy_file_range(), which does clone-or-copy without any way to
control it. But the latest patch doesn't use that anymore, so we don't
really need it, if it's controversial.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2018-10-11 15:35:05 Re: COPY FROM WHEN condition
Previous Message Tom Lane 2018-10-11 13:53:45 Re: Debian mips: Failed test 'Check expected t_009_tbl data on standby'