On Wed, May 11, 2022 at 7:25 PM Etsuro Fujita <etsuro.fuj...@gmail.com> wrote:
> One thing I noticed is this bit:
>
> -    When multiple remote (sub)transactions are involved in a local
> -    (sub)transaction, by default <filename>postgres_fdw</filename> commits
> -    those remote (sub)transactions one by one when the local (sub)transaction
> -    commits.
> -    Performance can be improved with the following option:
> +    When multiple remote transactions or subtransactions are involved in a
> +    local transaction (or subtransaction) on a foreign server,
> +    <filename>postgres_fdw</filename> by default commits those remote
> +    transactions serially when the local transaction commits.
> Performance can be
> +    improved with the following option:
>
> I think this might still be a bit confusing.  How about rewriting it
> to something like  this?
>
> As described in F.38.4. Transaction Management, in postgres_fdw
> transactions are managed by creating corresponding remote
> transactions, and subtransactions are managed by creating
> corresponding remote subtransactions.  When multiple remote
> transactions are involved in the current local transaction,
> postgres_fdw by default commits those remote transactions serially
> when the local transaction is committed.  When multiple remote
> subtransactions are involved in the current local subtransaction, it
> by default commits those remote subtransactions serially when the
> local subtransaction is committed.  Performance can be improved with
> the following option:
>
> It might be a bit redundant to explain the transaction/subtransaction
> cases differently, but I think it makes it clear and maybe
> easy-to-understand that how they are handled by postgres_fdw by
> default.

I modified the patch that way.

On Wed, May 11, 2022 at 7:29 PM Etsuro Fujita <etsuro.fuj...@gmail.com> wrote:
> On Tue, May 10, 2022 at 12:58 AM Justin Pryzby <pry...@telsasoft.com> wrote:
> > On Mon, May 09, 2022 at 11:37:35AM -0400, Jonathan S. Katz wrote:
> > > -       If multiple foreign servers with this option enabled are involved 
> > > in
> > > -       a local (sub)transaction, multiple remote (sub)transactions 
> > > opened on
> > > -       those foreign servers in the local (sub)transaction are committed 
> > > in
> > > -       parallel across those foreign servers when the local 
> > > (sub)transaction
> > > -       commits.
> > > +       If multiple foreign servers with this option enabled have a local
> > > +       transaction, multiple remote transactions on those foreign 
> > > servers are
> > > +       committed in parallel across those foreign servers when the local
> > > +       transaction is committed.
> > >        </para>
> >
> > I think "have a transaction" doesn't sound good, and the old language 
> > "involved
> > in" was better.
>
> I think so too.

I modified the patch to use the old language.  Also, I fixed a typo
reported by Justin.

Attached is an updated patch.  I'll commit the patch if no objections.

Best regards,
Etsuro Fujita

Attachment: parallel-commit-docs-efujita.patch
Description: Binary data

Reply via email to