From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Asynchronous Append on postgres_fdw nodes. |
Date: | 2021-03-31 05:12:07 |
Message-ID: | CAPmGK17T9Swy2FHZk4AVVKNzRxVnd96PX-18DSC2jeDXWNiBoQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 31, 2021 at 10:11 AM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
> + <term><literal>async_capable</literal></term>
> + <listitem>
> + <para>
> + This option controls whether <filename>postgres_fdw</filename> allows
> + foreign tables to be scanned concurrently for asynchronous execution.
> + It can be specified for a foreign table or a foreign server.
>
> Isn't it strange that an option named "async_capable" *allows* async?
I think "async_capable" is a good name for that option. See the
option "updatable" below in the postgres_fdw documentation.
> + * We'll prefer to consider this join async-capable if any table from
> + * either side of the join is considered async-capable.
> + */
> + fpinfo->async_capable = fpinfo_o->async_capable ||
> + fpinfo_i->async_capable;
>
> We need to explain this behavior in the documentation.
>
> Regarding to the wording "async capable", if it literally represents
> the capability to run asynchronously, when any one element of a
> combined path doesn't have the capability, the whole path cannot be
> async-capable. If it represents allowance for an element to run
> asynchronously, then the whole path is inhibited to run asynchronously
> unless all elements are allowed to do so. If it represents
> enforcement or suggestion to run asynchronously, enforcing asynchrony
> to an element would lead to running the whole path asynchronously
> since all elements of postgres_fdw are capable to run asynchronously
> as the nature.
>
> It looks somewhat inconsistent to be inhibitive for the default value
> of "async_capable", but agressive in merging?
If the foreign table has async_capable=true, it actually means that
there are resources (CPU, IO, network, etc.) to scan the foreign table
concurrently. And if any table from either side of the join has such
resources, then they could also be used for the join. So I don't
think this behavior is aggressive. I think it would be better to add
more comments, though.
Anyway, these are all about naming and docs/comments, so I'll return
to this after committing the patch.
Thanks for the review!
Best regards,
Etsuro Fujita
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2021-03-31 05:23:26 | Re: Stronger safeguard for archive recovery not to miss data |
Previous Message | Amit Kapila | 2021-03-31 05:10:15 | Re: Use consistent terminology for tablesync slots. |