PostgreSQL 14+ Pipelining Support
See original GitHub issuePostgreSQL 14 introduced the ability to Pipeline queries.
Are there any plans to support this with asyncpg
in any capacity? At the time of writing, I’m looking to optimize large numbers of inserts and updates, and pipelining seems like it could be an interesting solution. I checked the existing issues and didn’t seem to find anything related to this so I thought I’d open a fresh issue/feature request.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Documentation: 15: 34.5. Pipeline Mode - PostgreSQL
While the pipeline API was introduced in PostgreSQL 14, it is a client-side feature which doesn't require special server support and works on...
Read more >How PostgreSQL Pipeline Mode Works - Percona
Although introduced in PostgreSQL 14, pipeline mode works against any currently supported version of postgres as the enhancement is in the ...
Read more >Support Postgres 14 Pipelining #1113 - jackc/pgx - GitHub
Apparently Postgres 14 introduces the ability to pipeline queries, similar to batching, but, I think, with asynchronous results possible.
Read more >Pipeline mode: better performance on slow networks
This article shows how pipeline mode, new with PostgreSQL v14, can improve query performance over slow network connections.
Read more >Pipeline mode support - psycopg 3.1.5 documentation
The pipeline mode is available on any currently supported PostgreSQL version, but, in order to make use of it, the client must use...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Pipelining is already supported via
executemany
.Pipelining only makes sense if you are sending lots and lots of queries as is the case with bulk insert. For regular queries it makes very little sense in the face of substantial implementation complexity, cancellation issues etc. In your case you can trivially emulate pipelining by querying both tables at the same time like so: