Asynchronous Append on postgres_fdw nodes.
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2020-02-28T08:06:50Z
Lists: pgsql-hackers
Attachments
Hello, this is a follow-on of [1] and [2]. Currently the executor visits execution nodes one-by-one. Considering sharding, Append on multiple postgres_fdw nodes can work simultaneously and that can largely shorten the respons of the whole query. For example, aggregations that can be pushed-down to remote would be accelerated by the number of remote servers. Even other than such an extreme case, collecting tuples from multiple servers also can be accelerated by tens of percent [2]. I have suspended the work waiting asyncrohous or push-up executor to come but the mood seems inclining toward doing that before that to come [3]. The patchset consists of three parts. - v2-0001-Allow-wait-event-set-to-be-regsitered-to-resoure.patch The async feature uses WaitEvent, and it needs to be released on error. This patch makes it possible to register WaitEvent to resowner to handle that case.. - v2-0002-infrastructure-for-asynchronous-execution.patch It povides an abstraction layer of asynchronous behavior (execAsync). Then adds ExecAppend, another version of ExecAppend, that handles "async-capable" subnodes asynchronously. Also it contains planner part that makes planner aware of "async-capable" and "async-aware" path nodes. - v2-0003-async-postgres_fdw.patch The "async-capable" postgres_fdw. It accelerates multiple postgres_fdw nodes on a single connection case as well as postgres_fdw nodes on dedicate connections. regards. [1] https://www.postgresql.org/message-id/2020012917585385831113%40highgo.ca [2] https://www.postgresql.org/message-id/20180515.202945.69332784.horiguchi.kyotaro@lab.ntt.co.jp [3] https://www.postgresql.org/message-id/20191205181217.GA12895%40momjian.us -- Kyotaro Horiguchi NTT Open Source Software Center
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