From 0dd69daa6794de67ca6398d4f72869ae3c17dcdb Mon Sep 17 00:00:00 2001 From: Vignesh C Date: Sat, 1 Aug 2020 09:00:36 +0530 Subject: [PATCH v6 4/6] Documentation for parallel copy. This patch has the documentation changes for parallel copy. --- doc/src/sgml/ref/copy.sgml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 18189ab..19b1979 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -37,6 +37,7 @@ COPY { table_name [ ( delimiter_character' NULL 'null_string' HEADER [ boolean ] + PARALLEL integer QUOTE 'quote_character' ESCAPE 'escape_character' FORCE_QUOTE { ( column_name [, ...] ) | * } @@ -275,6 +276,22 @@ COPY { table_name [ ( + PARALLEL + + + Perform COPY FROM in parallel using integer background workers. Please + note that it is not guaranteed that the number of parallel workers + specified in integer will + be used during execution. It is possible for a copy to run with fewer + workers than specified, or even with no workers at all (for example, + due to the setting of max_worker_processes). This option is allowed + only in COPY FROM. + + + + + QUOTE @@ -951,6 +968,20 @@ COPY country FROM '/usr1/proj/bray/sql/country_data'; + To copy data parallelly from a file into the country table: + +COPY country FROM '/usr1/proj/bray/sql/country_data' WITH (PARALLEL 1); + + + + + To copy data parallelly from STDIN into the country table: + +COPY country FROM STDIN WITH (PARALLEL 1); + + + + To copy into a file just the countries whose names start with 'A': COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO '/usr1/proj/bray/sql/a_list_countries.copy'; -- 1.8.3.1