pg_upgrade: Allow use of file cloning

Peter Eisentraut <peter_e@gmx.net>

Commit: 3a769d8239afdc003c91a56d2d8d5adfadacda5d
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2018-11-07T17:35:20Z
Releases: 12.0
pg_upgrade: Allow use of file cloning

Add another transfer mode --clone to pg_upgrade (besides the existing
--link and the default copy), using special file cloning calls.  This
makes the file transfer faster and more space efficient, achieving
speed similar to --link mode without the associated drawbacks.

On Linux, file cloning is supported on Btrfs and XFS (if formatted with
reflink support).  On macOS, file cloning is supported on APFS.

Reviewed-by: Michael Paquier <michael@paquier.xyz>

Files

PathChange+/−
configure modified +1 −1
configure.in modified +1 −0
doc/src/sgml/ref/pgupgrade.sgml modified +34 −6
src/bin/pg_upgrade/check.c modified +11 −2
src/bin/pg_upgrade/file.c modified +90 −0
src/bin/pg_upgrade/option.c modified +7 −0
src/bin/pg_upgrade/pg_upgrade.h modified +5 −1
src/bin/pg_upgrade/relfilenode.c modified +29 −15
src/include/pg_config.h.in modified +3 −0

Documentation touched