Doc: warn against using parallel restore with --load-via-partition-root.
authorTom Lane
Sun, 23 Sep 2018 22:34:18 +0000 (18:34 -0400)
committerTom Lane
Sun, 23 Sep 2018 22:34:18 +0000 (18:34 -0400)
This isn't terribly safe, and making it so doesn't seem like a small
project, so for the moment just warn against it.

Discussion: https://postgr.es/m/13624.1535486019@sss.pgh.pa.us

doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dumpall.sgml

index f402d46b0cfbd74818f0dc7a1ecaf39d04bd77a7..65083fd9702c7ff1042a928ea17496cd30370f0f 100644 (file)
@@ -793,13 +793,26 @@ PostgreSQL documentation
       
       
        
-        When dumping a COPY or INSERT statement for a partitioned table,
-        target the root of the partitioning hierarchy which contains it rather
-        than the partition itself.  This may be useful when reloading data on
-        a server where rows do not always fall into the same partitions as
-        they did on the original server.  This could happen, for example, if
-        the partitioning column is of type text and the two system have
-        different definitions of the collation used to partition the data.
+        When dumping data for a table partition, make
+        the COPY or INSERT statements
+        target the root of the partitioning hierarchy that contains it, rather
+        than the partition itself.  This causes the appropriate partition to
+        be re-determined for each row when the data is loaded.  This may be
+        useful when reloading data on a server where rows do not always fall
+        into the same partitions as they did on the original server.  That
+        could happen, for example, if the partitioning column is of type text
+        and the two systems have different definitions of the collation used
+        to sort the partitioning column.
+       
+
+       
+        It is best not to use parallelism when restoring from an archive made
+        with this option, because pg_restore will
+        not know exactly which partition(s) a given archive data item will
+        load data into.  This could result in inefficiency due to lock
+        conflicts between parallel jobs, or perhaps even reload failures due
+        to foreign key constraints being set up before all the relevant data
+        is loaded.
        
       
      
index 22cb7907035ad1dbd1d96f34e54912e9521f01f7..0ca099e3c79fb9a75e5262d3faa341d2a564a19f 100644 (file)
@@ -330,14 +330,21 @@ PostgreSQL documentation
       
       
        
-        When dumping a COPY or INSERT statement for a partitioned table,
-        target the root of the partitioning hierarchy which contains it rather
-        than the partition itself.  This may be useful when reloading data on
-        a server where rows do not always fall into the same partitions as
-        they did on the original server.  This could happen, for example, if
-        the partitioning column is of type text and the two system have
-        different definitions of the collation used to partition the data.
-       
+        When dumping data for a table partition, make
+        the COPY or INSERT statements
+        target the root of the partitioning hierarchy that contains it, rather
+        than the partition itself.  This causes the appropriate partition to
+        be re-determined for each row when the data is loaded.  This may be
+        useful when reloading data on a server where rows do not always fall
+        into the same partitions as they did on the original server.  That
+        could happen, for example, if the partitioning column is of type text
+        and the two systems have different definitions of the collation used
+        to sort the partitioning column.
+       
+
+