postgresql/doc/src/sgml/ref
Tomas Vondra f8ce4ed78c Allow copying files using clone/copy_file_range
Adds --clone/--copy-file-range options to pg_combinebackup, to allow
copying files using file cloning or copy_file_range(). These methods may
be faster than the standard block-by-block copy, but the main advantage
is that they enable various features provided by CoW filesystems.

This commit only uses these copy methods for files that did not change
and can be copied as a whole from a single backup.

These new copy methods may not be available on all platforms, in which
case the command throws an error (immediately, even if no files would be
copied as a whole). This early failure seems better than failing later
when trying to copy the first file, after performing a lot of work on
earlier files.

If the requested copy method is available, but a checksum needs to be
recalculated (e.g. because of a different checksum type), the file is
still copied using the requested method, but it is also read for the
checksum calculation. Depending on the filesystem this may be more
expensive than just performing the simple copy, but it does enable the
CoW benefits.

Initial patch by Jakub Wartak, various reworks and improvements by me.

Author: Tomas Vondra, Jakub Wartak
Reviewed-by: Thomas Munro, Jakub Wartak, Robert Haas
Discussion: https://postgr.es/m/3024283a-7491-4240-80d0-421575f6bb23%40enterprisedb.com
2024-04-05 18:01:32 +02:00
..
abort.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
allfiles.sgml pg_createsubscriber: creates a new logical replica from a standby server 2024-03-25 12:42:47 +01:00
alter_aggregate.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_collation.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_conversion.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_database.sgml Revert "Add USER SET parameter values for pg_db_role_setting" 2023-05-17 20:28:57 +03:00
alter_default_privileges.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
alter_domain.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_event_trigger.sgml doc: remove incorrect grammar for ALTER EVENT TRIGGER 2024-02-01 10:45:37 +01:00
alter_extension.sgml Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
alter_foreign_data_wrapper.sgml doc: Fix syntax in ALTER FOREIGN DATA WRAPPER example 2023-12-19 14:13:50 +01:00
alter_foreign_table.sgml doc: Fix example command for ALTER FOREIGN TABLE ... OPTIONS. 2023-06-08 20:12:51 +09:00
alter_function.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_group.sgml Make role grant system more consistent with other privileges. 2022-08-22 11:35:17 -04:00
alter_index.sgml Revert per-index collation version tracking feature. 2021-05-07 21:10:11 +12:00
alter_language.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_large_object.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_materialized_view.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_opclass.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_operator.sgml Extend ALTER OPERATOR to allow setting more optimization attributes. 2023-10-20 12:28:46 -04:00
alter_opfamily.sgml Use the correct article for abbreviations 2021-06-11 13:38:04 +12:00
alter_policy.sgml doc: Improve hyphenation consistency 2021-04-21 08:14:43 +02:00
alter_procedure.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_publication.sgml Doc: Make link names consistent in logical replication commands. 2023-10-30 10:46:31 +05:30
alter_role.sgml Improve some documentation about the bootstrap superuser. 2024-01-18 21:39:51 -06:00
alter_routine.sgml Doc: fix confusion about LEAKPROOF in syntax summaries. 2021-06-23 14:27:13 -04:00
alter_rule.sgml
alter_schema.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_sequence.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_server.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_statistics.sgml Make stxstattarget nullable 2024-03-17 12:26:26 +01:00
alter_subscription.sgml Doc: Warn about two_phase when altering a subscription's slot name. 2024-03-11 09:33:04 +05:30
alter_system.sgml Add allow_alter_system GUC. 2024-03-29 08:45:11 -04:00
alter_table.sgml Allow specifying an access method for partitioned tables 2024-03-25 16:30:36 +01:00
alter_tablespace.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_trigger.sgml Make ALTER TRIGGER RENAME consistent for partitioned tables 2021-07-22 18:33:47 -04:00
alter_tsconfig.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_tsdictionary.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_tsparser.sgml
alter_tstemplate.sgml
alter_type.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
alter_user.sgml Revert "Add USER SET parameter values for pg_db_role_setting" 2023-05-17 20:28:57 +03:00
alter_user_mapping.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
alter_view.sgml More documentation update for GRANT ... WITH SET OPTION. 2023-01-16 10:35:29 -05:00
analyze.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
begin.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
call.sgml Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
checkpoint.sgml Rename pg_checkpointer predefined role to pg_checkpoint. 2022-07-05 13:31:42 -04:00
close.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
cluster.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
clusterdb.sgml clusterdb: Allow specifying tables to process in all databases. 2024-03-11 13:11:20 -05:00
comment.sgml Doc: clarify use of NULL to drop comments and security labels. 2023-01-31 14:32:24 -05:00
commit.sgml Doc: add XML ID attributes to <sectN> and <varlistentry> tags. 2023-01-09 15:08:24 -05:00
commit_prepared.sgml doc: Remove unused title ids 2020-03-13 15:45:37 +01:00
copy.sgml Add new COPY option LOG_VERBOSITY. 2024-04-01 15:25:25 +09:00
create_access_method.sgml
create_aggregate.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_cast.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_collation.sgml Support C.UTF-8 locale in the new builtin collation provider. 2024-03-19 15:24:41 -07:00
create_conversion.sgml Add 'noError' argument to encoding conversion functions. 2021-04-01 11:45:22 +03:00
create_database.sgml Support C.UTF-8 locale in the new builtin collation provider. 2024-03-19 15:24:41 -07:00
create_domain.sgml Convert domain_in to report errors softly. 2022-12-11 12:56:54 -05:00
create_event_trigger.sgml Add GUC for temporarily disabling event triggers 2023-09-25 12:41:49 +02:00
create_extension.sgml doc: Fix man page whitespace issues 2021-04-09 23:36:46 +02:00
create_foreign_data_wrapper.sgml
create_foreign_table.sgml doc: Fix some typos and grammar 2023-10-25 09:40:55 +09:00
create_function.sgml Allow "internal" subtransactions in parallel mode. 2024-03-28 12:43:10 -04:00
create_group.sgml Doc: sync CREATE GROUP syntax synopsis with CREATE ROLE. 2020-04-10 10:44:09 -04:00
create_index.sgml Fix search_path to a safe value during maintenance operations. 2024-03-04 17:31:38 -08:00
create_language.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_materialized_view.sgml Doc: be more precise about conflicts between relation names. 2021-11-02 12:12:02 -04:00
create_opclass.sgml Use the correct article for abbreviations 2021-06-11 13:38:04 +12:00
create_operator.sgml Doc: update CREATE OPERATOR's statement about => as an operator. 2023-10-20 13:01:02 -04:00
create_opfamily.sgml
create_policy.sgml Add support for MERGE SQL command 2022-03-28 16:47:48 +02:00
create_procedure.sgml doc: Fix man page whitespace issues 2021-04-09 23:36:46 +02:00
create_publication.sgml Doc: Make link names consistent in logical replication commands. 2023-10-30 10:46:31 +05:30
create_role.sgml doc: fix CREATE ROLE typo 2024-03-27 17:58:11 -04:00
create_rule.sgml Doc: update CREATE RULE ref page's hoary discussion of views. 2023-11-03 11:48:23 -04:00
create_schema.sgml Fix various typos in code and tests 2023-02-09 14:43:53 +09:00
create_sequence.sgml doc: fix wrong tag used in create sequence manual. 2022-08-16 09:20:14 +09:00
create_server.sgml doc: foreign servers with pushdown need matching collation 2023-10-10 16:04:56 -04:00
create_statistics.sgml Doc: mention that extended stats aren't used for joins 2023-06-22 12:45:50 +12:00
create_subscription.sgml Clean-ups for 776621a5e4 and 7329240437. 2024-02-07 10:04:04 +05:30
create_table.sgml Allow specifying an access method for partitioned tables 2024-03-25 16:30:36 +01:00
create_table_as.sgml doc: clarify CREATE TABLE AS ... IF NOT EXISTS 2022-08-12 10:59:00 -04:00
create_tablespace.sgml Remove configure probes for symlink/readlink, and dead code. 2022-08-05 09:22:56 +12:00
create_transform.sgml plpython: Adjust docs after removal of Python 2 support. 2022-03-07 18:30:57 -08:00
create_trigger.sgml Support TRUNCATE triggers on foreign tables. 2022-07-12 09:18:02 +09:00
create_tsconfig.sgml
create_tsdictionary.sgml
create_tsparser.sgml
create_tstemplate.sgml
create_type.sgml Create infrastructure for "soft" error reporting. 2022-12-09 09:58:38 -05:00
create_user.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
create_user_mapping.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
create_view.sgml Support MERGE into updatable views. 2024-02-29 15:56:59 +00:00
createdb.sgml Fix documentation oversights from 2d819a08a1. 2024-03-18 17:13:18 -07:00
createuser.sgml Document deprecated createuser option. 2023-05-23 19:35:05 -07:00
deallocate.sgml
declare.sgml In plpgsql, don't preassign portal names to bound cursor variables. 2023-01-01 13:22:34 -05:00
delete.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
discard.sgml
do.sgml doc: Remove unused title ids 2020-03-13 15:45:37 +01:00
drop_access_method.sgml
drop_aggregate.sgml
drop_cast.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_collation.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_conversion.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_database.sgml doc: Trim trailing whitespace 2020-06-07 13:24:40 +02:00
drop_domain.sgml
drop_event_trigger.sgml
drop_extension.sgml doc: clarify DROP EXTENSION dependent members text 2022-08-12 09:07:11 -04:00
drop_foreign_data_wrapper.sgml
drop_foreign_table.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
drop_function.sgml doc: Fix man page whitespace issues 2020-06-07 14:54:28 +02:00
drop_group.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_index.sgml doc: Clarify use of ACCESS EXCLUSIVE lock in various sections 2021-04-01 15:28:37 +09:00
drop_language.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_materialized_view.sgml
drop_opclass.sgml
drop_operator.sgml Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
drop_opfamily.sgml
drop_owned.sgml Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
drop_policy.sgml doc: Improve hyphenation consistency 2021-04-21 08:14:43 +02:00
drop_procedure.sgml doc: Fix man page whitespace issues 2022-04-07 18:25:12 +02:00
drop_publication.sgml
drop_role.sgml Restrict the privileges of CREATEROLE users. 2023-01-10 12:44:30 -05:00
drop_routine.sgml Reconsider the handling of procedure OUT parameters. 2021-06-10 17:11:36 -04:00
drop_rule.sgml
drop_schema.sgml
drop_sequence.sgml
drop_server.sgml
drop_statistics.sgml doc: Mention CASCADE/RESTRICT for DROP STATISTICS 2021-07-19 12:39:38 +09:00
drop_subscription.sgml Doc: Add more links in logical replication pages. 2023-10-13 12:13:46 +05:30
drop_table.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_tablespace.sgml
drop_transform.sgml plpython: Adjust docs after removal of Python 2 support. 2022-03-07 18:30:57 -08:00
drop_trigger.sgml
drop_tsconfig.sgml
drop_tsdictionary.sgml
drop_tsparser.sgml
drop_tstemplate.sgml
drop_type.sgml
drop_user.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
drop_user_mapping.sgml Allow CURRENT_ROLE where CURRENT_USER is accepted 2020-09-17 11:40:08 +02:00
drop_view.sgml
dropdb.sgml Fix connection string handling in src/bin/scripts/ programs. 2020-10-19 19:03:46 -04:00
dropuser.sgml Restrict the privileges of CREATEROLE users. 2023-01-10 12:44:30 -05:00
ecpg-ref.sgml Fix our getopt_long's behavior for a command line argument of just "-". 2020-03-23 11:58:00 -04:00
end.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
execute.sgml Doc: fix "Unresolved ID reference" warnings, clean up man page cross-refs. 2020-05-11 14:15:55 -04:00
explain.sgml Invent SERIALIZE option for EXPLAIN. 2024-04-03 17:41:57 -04:00
fetch.sgml doc: Fix XML formatting that psql cannot handle 2023-02-03 09:04:35 +01:00
grant.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
import_foreign_schema.sgml
initdb.sgml Adjust documentation for syncfs(). 2024-03-27 10:23:13 -05:00
insert.sgml doc: clarify that "excluded" ON CONFLICT is a single row 2022-07-14 15:33:28 -04:00
listen.sgml Use larger segment file names for pg_notify 2023-11-29 01:41:48 +02:00
load.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
lock.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
merge.sgml Add support for MERGE ... WHEN NOT MATCHED BY SOURCE. 2024-03-30 10:00:26 +00:00
move.sgml doc: Fix XML formatting that psql cannot handle 2023-02-03 09:04:35 +01:00
notify.sgml Use larger segment file names for pg_notify 2023-11-29 01:41:48 +02:00
pg_amcheck.sgml Teach contrib/amcheck to check the unique constraint violation 2023-10-28 00:21:23 +03:00
pg_basebackup.sgml Adjust documentation for syncfs(). 2024-03-27 10:23:13 -05:00
pg_checksums.sgml Adjust documentation for syncfs(). 2024-03-27 10:23:13 -05:00
pg_combinebackup.sgml Allow copying files using clone/copy_file_range 2024-04-05 18:01:32 +02:00
pg_config-ref.sgml Add missing <application> tags in application doc <refentrytitle>s 2020-07-10 16:51:29 +02:00
pg_controldata.sgml doc: remove unnecessary blank before command option text 2020-12-03 11:33:24 -05:00
pg_createsubscriber.sgml pg_createsubscriber: creates a new logical replica from a standby server 2024-03-25 12:42:47 +01:00
pg_ctl-ref.sgml Remove exclusive backup mode 2022-04-06 14:41:03 -04:00
pg_dump.sgml Adjust documentation for syncfs(). 2024-03-27 10:23:13 -05:00
pg_dumpall.sgml Read include/exclude commands for dump/restore from file 2023-11-29 14:56:24 +01:00
pg_isready.sgml doc: libpq connection options can override command-line flags 2020-10-02 22:19:31 -04:00
pg_receivewal.sgml doc: wording improvements 2023-10-27 17:23:34 -04:00
pg_recvlogical.sgml doc: wording improvements 2023-10-27 17:23:34 -04:00
pg_resetwal.sgml doc: pg_resetwal: Add comments how the multipliers are derived 2023-11-06 09:16:00 +01:00
pg_restore.sgml Invent --transaction-size option for pg_restore. 2024-04-01 16:46:24 -04:00
pg_rewind.sgml Adjust documentation for syncfs(). 2024-03-27 10:23:13 -05:00
pg_verifybackup.sgml Add the system identifier to backup manifests. 2024-03-13 15:12:33 -04:00
pg_waldump.sgml doc: wording improvements 2023-10-27 17:23:34 -04:00
pg_walsummary.sgml Fix typo. 2024-01-12 09:46:46 -05:00
pgarchivecleanup.sgml pg_archivecleanup: Add --clean-backup-history 2023-07-19 13:41:22 +09:00
pgbench.sgml Adjust pgbench option for debug mode. 2024-03-25 11:08:53 -05:00
pgtestfsync.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
pgtesttiming.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
pgupgrade.sgml Adjust documentation for syncfs(). 2024-03-27 10:23:13 -05:00
postgres-ref.sgml Provide options for postmaster to kill child processes with SIGABRT. 2022-11-21 11:59:29 -05:00
prepare.sgml Doc: Miscellaneous doc updates for MERGE. 2023-02-26 09:06:04 +00:00
prepare_transaction.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
psql-ref.sgml doc: \copy can get data values \. and end-of-input confused 2023-11-03 13:57:59 -04:00
reassign_owned.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
refresh_materialized_view.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
reindex.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
reindexdb.sgml reindexdb: Add the index-level REINDEX with multiple jobs 2024-03-25 02:07:15 +02:00
release_savepoint.sgml doc: add transaction processing chapter with internals info 2022-11-29 20:49:52 -05:00
reset.sgml
revoke.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
rollback.sgml Doc: add XML ID attributes to <sectN> and <varlistentry> tags. 2023-01-09 15:08:24 -05:00
rollback_prepared.sgml doc: Remove unused title ids 2020-03-13 15:45:37 +01:00
rollback_to.sgml doc: add transaction processing chapter with internals info 2022-11-29 20:49:52 -05:00
savepoint.sgml doc: clarify the behavior of identically-named savepoints 2022-07-14 15:44:22 -04:00
security_label.sgml Doc: fix typo in SECURITY LABEL synopsis. 2024-02-19 14:17:11 -05:00
select.sgml Add RETURNING support to MERGE. 2024-03-17 13:58:59 +00:00
select_into.sgml Fix various typos, grammar and code style in comments and docs 2022-01-25 09:40:04 +09:00
set.sgml doc: mention that SET TIME ZONE often needs to be quoted 2022-08-31 20:27:27 -04:00
set_constraints.sgml doc: make ref/*.sgml file header comment layout consistent 2020-05-15 08:52:24 -04:00
set_role.sgml doc: Clarify requirements for SET ROLE. 2024-03-24 15:23:55 -05:00
set_session_auth.sgml Fix privilege check for SET SESSION AUTHORIZATION. 2023-07-13 21:13:45 -07:00
set_transaction.sgml Doc: Miscellaneous doc updates for MERGE. 2023-02-26 09:06:04 +00:00
show.sgml Remove trailing whitespace from *.sgml files. 2022-04-20 11:04:49 -04:00
start_transaction.sgml Improve <xref> vs. <command> formatting in the documentation 2020-10-03 16:40:02 +02:00
truncate.sgml doc: Review for "Allow TRUNCATE command to truncate foreign tables". 2021-04-27 18:39:30 +09:00
unlisten.sgml
update.sgml doc: Make UPDATE FROM examples consistent 2022-03-29 14:53:20 +02:00
vacuum.sgml Reintroduce MAINTAIN privilege and pg_maintain predefined role. 2024-03-13 14:49:26 -05:00
vacuumdb.sgml vacuumdb: Allow specifying objects to process in all databases. 2024-03-11 10:33:36 -05:00
values.sgml doc: Properly punctuate "etc." 2022-05-19 09:42:17 +02:00