frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Pipelining in psql (PostgreSQL 18)

https://postgresql.verite.pro/blog/2025/10/01/psql-pipeline.html
71•tanelpoder•4h ago

Comments

WilcoKruijer•2h ago
I feel pipelines (or batches) are slept upon. So many applications use interactive transactions to ‘batch’ multiple queries, waiting for the result of each individual query. Network roundtrip is the biggest contributor to latency in most applications, and this makes it so much worse. Most Postgres drivers don’t even support batching, at least in the JavaScript world.

In many cases it would be good to forego interactive transactions and instead execute all read-only queries at once, and another write batch after doing processing on the obtained data. That way, the amount of roundtrips is bounded. There are some complications of course, like dealing with concurrency becomes more complicated. I’m currently prototyping a library exploring these ideas.

tmountain•2h ago
Batching in general is slept upon. So many queue systems support batch injection, and I have seen countless cases where a poorly performing system is “fixed” simply by moving away from incremental injection. This stuff is usually on page two of the docs, which explains why it’s so overlooked…
ako•1h ago
I would expect most drivers to support (anonymous) stored procedures so you can batch/pipeline multiple queries into one statement to be executed by the database. Probably more a problem of developers not knowing how to use databases properly, not so much a limitation of technology.
mxey•24m ago
You don’t even need driver support, you can use https://www.postgresql.org/docs/current/sql-do.html
mxey•25m ago
I have started to use batching with the Go pgx driver for simple transactions of multiple inserts. Since a batch is automatically a transaction, it’s actually fewer lines of code.
tlocke•1h ago
I must confess, the Python driver pg8000 which I maintain doesn't support pipeline mode. I didn't realise it existed until now, and nobody has ever asked for it. I've created an issue for it https://codeberg.org/tlocke/pg8000/issues/174
codesnik•55m ago
activerecord in Rails has async mode, which allows you to queue several requests and read results later. But those will go through the connection pool, and will be executed in separate connections, separate transactions, and separate PostgreSQL server processes. I wonder if using pipelining instead, on a driver level (app code would be the same), would be a better approach in general, or at least easier on db instance.
codesnik•52m ago
ah, of course it have been discussed already https://discuss.rubyonrails.org/t/proposal-adding-postgres-p...
byroot•18m ago
Yes, the need isn't exactly the same. `load_async` use case if for known slow-ish queries, hence for which you want actual parallelization on the server.

Since that discussion on the forum, I talked more about pipelining with some other core devs, and that may happen in some form or another in the future.

The main limiting factor is that most of the big Rails contributors work with MySQL, not Postgres, and MySQL doesn't really have proper pipelining support.

theThree•31m ago
I developed a JS pg client that use pipeline mode by default: https://github.com/stanNthe5/pgline

Meta Superintelligence's surprising first paper

https://paddedinputs.substack.com/p/meta-superintelligences-surprising
274•skadamat•10h ago•144 comments

Pipelining in psql (PostgreSQL 18)

https://postgresql.verite.pro/blog/2025/10/01/psql-pipeline.html
71•tanelpoder•4h ago•10 comments

The Flummoxagon

https://n-e-r-v-o-u-s.com/blog/?p=9827
24•robinhouston•4d ago•4 comments

Show HN: Rift – A tiling window manager for macOS

https://github.com/acsandmann/rift
126•atticus_•9h ago•56 comments

Show HN: Sober not Sorry – free iOS tracker to help you quit bad habits

https://sobernotsorry.app/
15•molozhenko•2h ago•8 comments

I/O Multiplexing (select vs. poll vs. epoll/kqueue)

https://nima101.github.io/io_multiplexing
37•pykello•3d ago•6 comments

Coral Protocol: Open infrastructure connecting the internet of agents

https://arxiv.org/abs/2505.00749
23•joj333•6h ago•1 comments

Ask HN: Abandoned/dead projects you think died before their time and why?

119•ofalkaed•11h ago•360 comments

Vancouver Stock Exchange: Scam capital of the world (1989) [pdf]

https://scamcouver.wordpress.com/wp-content/uploads/2012/04/scam-capital.pdf
88•thomassmith65•9h ago•40 comments

Anthropic's Prompt Engineering Tutorial

https://github.com/anthropics/prompt-eng-interactive-tutorial
143•cjbarber•15h ago•15 comments

Show HN: A Lisp Interpreter for Shell Scripting

https://github.com/gue-ni/redstart
52•quintussss•3d ago•7 comments

The World's 2.75B Buildings

https://tech.marksblogg.com/building-footprints-gba.html
45•marklit•4d ago•17 comments

Spyware maker NSO Group confirms acquisition by US investors

https://techcrunch.com/2025/10/10/spyware-maker-nso-group-confirms-acquisition-by-us-investors/
99•corvad•4h ago•60 comments

A Guide for WireGuard VPN Setup with Pi-Hole Adblock and Unbound DNS

https://psyonik.tech/posts/a-guide-for-wireguard-vpn-setup-with-pi-hole-adblock-and-unbound-dns/
81•pSYoniK•14h ago•8 comments

Paper2Video: Automatic Video Generation from Scientific Papers

https://arxiv.org/abs/2510.05096
45•jinqueeny•10h ago•9 comments

Microsoft only lets you opt out of AI photo scanning 3x a year

https://hardware.slashdot.org/story/25/10/11/0238213/microsofts-onedrive-begins-testing-face-reco...
609•dmitrygr•15h ago•211 comments

Floating Electrons on a Sea of Helium

https://arstechnica.com/science/2025/10/new-qubit-tech-traps-single-electrons-on-liquid-helium/
7•coloneltcb•3d ago•0 comments

LineageOS 23

https://lineageos.org/Changelog-30/
229•cdesai•9h ago•90 comments

The App Store was always authoritarian

https://infrequently.org/2025/10/the-app-store-was-always-authoritarian/
96•bertman•2h ago•59 comments

Testing two 18 TB white label SATA hard drives from datablocks.dev

https://ounapuu.ee/posts/2025/10/06/datablocks-white-label-drives/
177•thomasjb•6d ago•106 comments

CamoLeak: Critical GitHub Copilot Vulnerability Leaks Private Source Code

https://www.legitsecurity.com/blog/camoleak-critical-github-copilot-vulnerability-leaks-private-s...
37•greyadept•10h ago•9 comments

Windows Subsystem for FreeBSD

https://github.com/BalajeS/WSL-For-FreeBSD
258•rguiscard•1d ago•106 comments

How Apple designs a virtual knob (2012)

https://jherrm.github.io/knobs/
141•gregsadetsky•4d ago•89 comments

Google blocks Android hack that let Pixel users enable VoLTE anywhere

https://www.androidauthority.com/pixel-ims-broken-october-update-3606444/
155•josephcsible•10h ago•52 comments

Superpowers: How I'm using coding agents in October 2025

https://blog.fsck.com/2025/10/09/superpowers/
354•Ch00k•1d ago•185 comments

The World Trade Center under construction through photos, 1966-1979

https://rarehistoricalphotos.com/twin-towers-construction-photographs/
215•kinderjaje•5d ago•102 comments

The <output> Tag

https://denodell.com/blog/html-best-kept-secret-output-tag
763•todsacerdoti•1d ago•170 comments

Vibing a non-trivial Ghostty feature

https://mitchellh.com/writing/non-trivial-vibing
265•skevy•19h ago•124 comments

Beyond indexes: How open table formats optimize query performance

https://jack-vanlightly.com/blog/2025/10/8/beyond-indexes-how-open-table-formats-optimize-query-p...
59•jandrewrogers•3d ago•2 comments

GNU Health

https://www.gnuhealth.org/about-us.html
406•smartmic•17h ago•114 comments