Re: Asynchronous Append on postgres_fdw nodes.
Andrei Lepikhov <a.lepikhov@postgrespro.ru>
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Stephen Frost <sfrost@snowman.net>,
Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-07T09:59:52Z
Lists: pgsql-hackers
On 6/5/21 22:12, Stephen Frost wrote: > * Etsuro Fujita (etsuro.fujita@gmail.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
Commits
-
Improve comments for trivial_subqueryscan().
- 4a8a5dd7f59c 15.0 landed
-
Disable asynchronous execution if using gating Result nodes.
- ebb790241523 14.3 landed
- 5c854e7a2c8a 15.0 landed
-
Allow asynchronous execution in more cases.
- c2bb02bc2e85 15.0 landed
-
Doc: Further update documentation for asynchronous execution.
- eab81953682d 14.0 landed
-
Fix rescanning of async-aware Append nodes.
- f3baaf28a6da 14.0 landed
-
Doc: Update documentation for asynchronous execution.
- 15fcd33e0694 14.0 landed
-
Fix EXPLAIN ANALYZE for async-capable nodes.
- a363bc6da96b 14.0 landed
-
Minor code cleanup in asynchronous execution support.
- bb684c82f733 14.0 landed
-
Adjust input value to WaitEventSetWait() in ExecAppendAsyncEventWait().
- a8af856d3257 14.0 landed
-
Add support for asynchronous execution.
- 27e1f14563cf 14.0 landed