Skip to content

Commit 8c8d307

Browse files
author
Etsuro Fujita
committed
Doc: Improve description of the "parallel_commit" option for postgres_fdw.
It wasn't very clear that if this option was enabled, postgres_fdw would commit remote transactions in parallel at main-transaction end, and commit remote subtransactions in parallel at subtransaction end, due to the references to (sub)transaction and other too specific documentation. Clarify that. Also reword to simplify. Follow-up for commit 04e706d. Jonathan S. Katz, reviewed by Justin Pryzby, with some modifications by me. Discussion: https://postgr.es/m/1435bfd1-172b-de38-f590-4404a5a62eb0%40postgresql.org
1 parent 30ed71e commit 8c8d307

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

doc/src/sgml/postgres-fdw.sgml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,16 @@ OPTIONS (ADD password_required 'false');
460460
<title>Transaction Management Options</title>
461461

462462
<para>
463-
When multiple remote (sub)transactions are involved in a local
464-
(sub)transaction, by default <filename>postgres_fdw</filename> commits
465-
those remote (sub)transactions one by one when the local (sub)transaction
466-
commits.
463+
As described in the Transaction Management section, in
464+
<filename>postgres_fdw</filename> transactions are managed by creating
465+
corresponding remote transactions, and subtransactions are managed by
466+
creating corresponding remote subtransactions. When multiple remote
467+
transactions are involved in the current local transaction, by default
468+
<filename>postgres_fdw</filename> commits those remote transactions
469+
serially when the local transaction is committed. When multiple remote
470+
subtransactions are involved in the current local subtransaction, by
471+
default <filename>postgres_fdw</filename> commits those remote
472+
subtransactions serially when the local subtransaction is committed.
467473
Performance can be improved with the following option:
468474
</para>
469475

@@ -474,26 +480,24 @@ OPTIONS (ADD password_required 'false');
474480
<listitem>
475481
<para>
476482
This option controls whether <filename>postgres_fdw</filename> commits
477-
remote (sub)transactions opened on a foreign server in a local
478-
(sub)transaction in parallel when the local (sub)transaction commits.
479-
This option can only be specified for foreign servers, not per-table.
480-
The default is <literal>false</literal>.
483+
in parallel remote transactions opened on a foreign server in a local
484+
transaction when the local transaction is committed. This setting also
485+
applies to remote and local subtransactions. This option can only be
486+
specified for foreign servers, not per-table. The default is
487+
<literal>false</literal>.
481488
</para>
482489

483490
<para>
484-
If multiple foreign servers with this option enabled are involved in
485-
a local (sub)transaction, multiple remote (sub)transactions opened on
486-
those foreign servers in the local (sub)transaction are committed in
487-
parallel across those foreign servers when the local (sub)transaction
488-
commits.
491+
If multiple foreign servers with this option enabled are involved in a
492+
local transaction, multiple remote transactions on those foreign
493+
servers are committed in parallel across those foreign servers when
494+
the local transaction is committed.
489495
</para>
490496

491497
<para>
492-
For a foreign server with this option enabled, if many remote
493-
(sub)transactions are opened on the foreign server in a local
494-
(sub)transaction, this option might increase the remote server's load
495-
when the local (sub)transaction commits, so be careful when using this
496-
option.
498+
When this option is enabled, a foreign server with many remote
499+
transactions may see a negative performance impact when the local
500+
transaction is committed.
497501
</para>
498502
</listitem>
499503
</varlistentry>

0 commit comments

Comments
 (0)