Re: Asynchronous Append on postgres_fdw nodes.

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Stephen Frost <sfrost(at)snowman(dot)net>, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Asynchronous Append on postgres_fdw nodes.
Date: 2021-05-07 09:59:52
Message-ID: c4ec1aa8-282a-f497-d544-e0668486cd53@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/5/21 22:12, Stephen Frost wrote:
> * Etsuro Fujita (etsuro(dot)fujita(at)gmail(dot)com) wrote:
>> I think the user should be careful about this. How about adding a
>> note about it to the “Asynchronous Execution Options” section in
>> postgres-fdw.sgml, like the attached?
+1
> ... then again, it'd really be better if we could figure out a way to
> just do the right thing here. I haven't looked at this in depth but I
> would think that the overhead of async would be well worth it just about
> any time there's more than one foreign server involved. Is it not
> reasonable to have a heuristic where we disable async in the cases where
> there's only one foreign server, but have it enabled all the other time?
> While continuing to allow users to manage it explicitly if they want.
Bechmarking of SELECT from foreign partitions hosted on the same server,
i see results:

With async append:
1 partition - 178 ms; 4 - 263; 8 - 450; 16 - 860; 32 - 1740.

Without:
1 - 178 ms; 4 - 583; 8 - 1140; 16 - 2302; 32 - 4620.

So, these results show that we have a reason to use async append in the
case where there's only one foreign server.

--
regards,
Andrey Lepikhov
Postgres Professional

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-05-07 10:01:40 Re: Bogus collation version recording in recordMultipleDependencies
Previous Message Pavel Stehule 2021-05-07 09:48:03 batch fdw insert bug (Postgres 14)