| 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-04-22 03:30:41 |
| Message-ID: | CAPmGK1637W30Wx3MnrReewhafn6F_0J76mrJGoFXFnpPq4QfvA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Mar 31, 2021 at 2:12 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> On Wed, Mar 31, 2021 at 10:11 AM Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> > + * 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.
> > 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.
>
> I'll return to this after committing the patch.
I updated the above comment so that it explains the reason. Please
find attached a patch. I did some cleanup as well:
* Simplified code in ExecAppendAsyncEventWait() a little bit to avoid
duplicating the same nevents calculation, and updated comments there.
* Added an assertion to ExecAppendAsyncRequest().
* Updated comments for fetch_more_data_begin().
Best regards,
Etsuro Fujita
| Attachment | Content-Type | Size |
|---|---|---|
| cleanup-in-async-support.patch | application/octet-stream | 2.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Borodin | 2021-04-22 03:39:33 | Re: ML-based indexing ("The Case for Learned Index Structures", a paper from Google) |
| Previous Message | Masahiko Sawada | 2021-04-22 02:55:33 | Re: Replication slot stats misgivings |