frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Does Postgres Scale?

https://www.dbos.dev/blog/benchmarking-workflow-execution-scalability-on-postgres
37•KraftyOne•2h ago

Comments

subhobroto•1h ago
DBOS is amazing when it comes to Durable Workflows. There are others in the space - the most popular one being Temporal but I argue, Temporal is also the most complicated one. I often say Temporal is like Kubernetes while DBOS is like `docker compose`. (and for those taking me literally, you can use DBOS in Kubernetes!)

I don't realize why DBOS is not nearly as popular as Temporal but it has made a world of difference building Durable Queues and Long Running, Durable Workflows in Python (it supports other languages too).

As they show in this article, Postgres scales impressively well (4 billion workflows per day, on a db.m7i.24xlarge, enough for most applications), which is why, if you have your PostgreSQL backup/restore strategy knocked out and dialed in, you should really take a close look at DBOS to handle your cloud agnostic or self hosted Durable Queues and Durable Workflows. It's an amazing piece of software founded by the original author of Ingres (precusor to Postgres - the story of DBOS itself is captivating. I believe it started from being unable to scale Spark job scheduling)

lelandbatey•6m ago
The reason that DBOS isn't as popular is because it's younger. DBOS launched in the form we know it in 2024. Temporal is much older; Temporal is technically a fork of Cadence and Cadence released originally in 2017, with Temporal forking and releasing back in 2020. When all three are trying to be "the same sort of thing" and that thing is new, it's hard to show up 7-8 years after the trailblazers and say "oh yeah, we're clearly better" when the existing thing works and is used by tons of folks.
JasonHEIN•1h ago
when discussing DB it becomes so so interesting not because db itself but the people trying to ask some infeasible questions
q3k•1h ago
Yes, you can scale it quite well vertically.

But how about horizontally? It would be nice to have high availability, or even to be able to upgrade the OS and postgres itself without downtime.

tuvix•58m ago
Only played around with it but you can use patroni, etcd and HAproxy to achieve this. It’s a pain, but I believe there was some kind of coolify-style open source application to do this for you but I can’t for the life of me remember its name
jrnkntl•46m ago
autobase[1] is the one I can think of

[1] https://github.com/autobase-tech/autobase

subhobroto•40m ago
You might be thinking of Pigsty?

Atleast I hope you are! Nothing else has been as well battletested. Unfortunately, perhaps because if its name, it gets no facetime on HN. Its last few mentions here barely received attention it deserved.

levl289•49m ago
Yep, this is what I think about when “scaling” is mentioned. Maybe I’m too distributed-compute brained, but throwing CPU at a db isn’t what I was hoping would be the answer.
_3u10•35m ago
So the point of distributed compute is to reduce the compute needed? I’ve generally found that distributed compute requires more compute than vertical scaling while getting clobbered by network bandwidth / latency.

Theoretically with 2 to 10x compute required and in practice 100 to 500x

literalAardvark•32m ago
The point of distributed computing is to do computing that you can't do on a vertically scaled system or to increase availability.

If you're doing it for other reasons it's usually a mistake.

literalAardvark•34m ago
Practically trivial to do in 2026 even by hand, and there are a couple of ready to use solutions that even make it automated.

If you're running it in kubernetes with cloudnativepg it's even easier.

The only thing it doesn't do well is master master replication which is why most of these does it scale posts mostly talk about how slow writes are. And they are pretty slow.

jghn•49m ago
It scales beyond the needs that most people have in most situations.

The constant problem is that "big scale" always means "larger than I've seen", so on any project larger than a person has encountered, they assume they need to pull out the big guns. Also, people worry about things like what happens if they really *do* scale 10 years from now.

Neither is a practical concern for nearly anyone who will ever face this decision.

And then yes, of course, some people have problems that actually can't be solved by Postgres. But verify this first, don't assume.

daneel_w•41m ago
"Overall, we find a Postgres server can handle up to 144K of these writes per second. That’s a lot, equivalent to 12 billion writes per day."

Based on a problem I'm facing with Postgres today, I wonder if this really progresses as linearly as the article wants to make it out.

We're in the middle of evaluating Postgres as a replacement for MySQL, and experience notable slow-down for plain multi-row inserts due to index growth as soon as the table reaches just a couple of dozen million rows. It's an uncomplicated and flat (no constraints or foreign keys etc.) medium width table of about 10-15 columns and a handful of non-composite btree indices - and/or hash indices; we've tried mixing and matching just to see what happens - but ingestion drops to less than half already before 50m rows. At 100m rows the insertion performance is down to a fraction and from there it just gets worse the larger the table and its indices grow. It's as if there's some specific exponential cut-off point where everything goes awry. However, if we simply remove all indices from the table, Postgres will happily insert hundreds of millions rows at a steady and near identical pace from start to end. The exact same table and indices on MySQL, as closely as we can match between MySQL and Postgres, running on the same OS and hardware, maintains more or less linear insertion performance well beyond 500m rows.

Now, there's a lot to say about the whys and why-nots when it comes to keeping tables of this size in an RDBMS and application design relying on it to work out, and probably a fair amount more about tuning Postgres' config, but we're stumped as to why PG's indexing performance falters this early when contrasted against InnoDB/MySQL. 50-100m rows really isn't much. Would greatly appreciate if anyone with insight could shed some light on it and maybe offer a few ideas to test out.

(add.: during these stress tests the hardware is nowhere close to over-encumbered, and there's consistent headroom on both memory, CPU and disk I/O)

giovannibonetti•20m ago
With some extra admin work, you can greatly increase your insert throughput, as long as the table load is comprised mostly of inserts: 1. Partition your table by range of a monotonic ID or timestamp. Notice the primary key will have to contain this column. A BIGINT id column should work fine; 2. Remove all the other indexes from the partitioned table. Add them to all the partitions, except the latest one. This way, the latest one can endure a tough write load, while the other ones work fine for reads; 3. Create an admin routine (perhaps with pg_cron) to create a new partition whenever the newest one is getting close to the limit. When the load moves to the newer partition, add indexes concurrently to the old one; 4. You'll notice the newest partition will the optimized for writes but not reads. You can offset some of that by replacing BTREE secondary indexes with BRIN [1], particularly the one with bloom operator (not to be confused with Postgres Bloom regular indexes [2]). BRIN is a family of indexes more optimized for writes than reads. If the partition is not too large, it shouldn't be too bad to read from it. 5. Later you can merge partitions to avoid having too many of them. Postgres has commands for that, but I think they lock the whole table, so a safer bet is to copy small partitions into a new larger one and swap them manually.

[1] https://www.postgresql.org/docs/current/brin.html [2] https://www.postgresql.org/docs/current/bloom.html

subhobroto•9m ago
These are good suggestions but I'm apprehensive they might come back and say they have 64 GB (or less) of RAM or they are using PostgreSQL RDS on AWS or something.

I asked them for specifics.

subhobroto•12m ago
You've given us some idea of the volume of your data but there's no mention of what's ingesting it or how.

> during these stress tests the hardware is nowhere close to over-encumbered, and there's consistent headroom on both memory, CPU and disk I/O

This assertion is likely wrong - you're likely skipping over some metrics that has clues to what we need to know. Here are some questions to get the discussion moving.

- Is this PostgreSQL managed or self-hosted?

Your mention of "consistent headroom on both memory, CPU and disk I/O" gives me hope you're self-hosting it but I've heard the same thing in the past from people attempting to use RDS and wondering the same as you are, so no assumptions.

- Are you using COPY or multi-row INSERT statements?

- How much RAM does that server have?

- What is the fillfactor, max_wal_size and checkpoint_timeout?

- Is the WAL on NVMe?

- What's the iostat or wa during the slowdown?

- Are random UUIDs (part of) the index?

Have you posted to https://dba.stackexchange.com/

If I were you, I would create a GitHub repo that has scripts that synthesize the data and reproduce the issues you're seeing.

Rivian allows you to disable all internet connectivity

https://rivian.com/support/article/can-i-disable-all-data-collection-from-my-vehicle
101•Cider9986•41m ago•32 comments

How Mark Klein told the EFF about Room 641A [book excerpt]

https://thereader.mitpress.mit.edu/the-whistleblower-who-uncovered-the-nsas-big-brother-machine/
324•the-mitr•4h ago•91 comments

Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

https://semgrep.dev/blog/2026/malicious-dependency-in-pytorch-lightning-used-for-ai-training/
251•j12y•4h ago•80 comments

LinkedIn scans for 6,278 extensions and encrypts the results into every request

https://404privacy.com/blog/linkedin-is-scanning-your-browser-extensions-this-is-how-they-use-the...
68•un-nf•1h ago•15 comments

I built a Game Boy emulator in F#

https://nickkossolapov.github.io/fame-boy/building-a-game-boy-emulator-in-fsharp/
134•elvis70•3h ago•32 comments

CopyFail was not disclosed to Gentoo developer

https://www.openwall.com/lists/oss-security/2026/04/30/10
254•ori_b•4h ago•171 comments

U.S. Senators Vote to Ban Themselves from Trading on Prediction Markets

https://www.wsj.com/politics/policy/senators-vote-to-ban-themselves-from-trading-on-prediction-ma...
146•kamaraju•1h ago•49 comments

Belgium stops decommissioning nuclear power plants

https://dpa-international.com/general-news/urn:newsml:dpa.com:20090101:260430-930-14717/
681•mpweiher•8h ago•596 comments

Claude Code refuses requests or charges extra if your commits mention "OpenClaw"

https://twitter.com/theo/status/2049645973350363168
736•elmean•6h ago•430 comments

How an oil refinery works

https://www.construction-physics.com/p/how-an-oil-refinery-works
256•chmaynard•7h ago•65 comments

Reverse Engineering SimTower

https://phulin.me/blog/simtower
34•patrickhulin•2d ago•5 comments

Durable queues, streams, pub/sub, and a cron scheduler – inside your SQLite file

https://honker.dev/
130•ferriswil•6h ago•33 comments

Full-Text Search with DuckDB

https://peterdohertys.website/blog-posts/full-text-search-w-duckdb.html
40•ethagnawl•2h ago•11 comments

You can beat the binary search

https://lemire.me/blog/2026/04/27/you-can-beat-the-binary-search/
192•vok•3d ago•95 comments

Does Postgres Scale?

https://www.dbos.dev/blog/benchmarking-workflow-execution-scalability-on-postgres
37•KraftyOne•2h ago•16 comments

Follow-up to Carrot disclosure: Forgejo

https://dustri.org/b/follow-up-to-carrot-disclosure-forgejo.html
19•homebrewer•1h ago•5 comments

I aggregated 28 US Government auction sites into one search

https://bidprowl.com
204•scarsam•8h ago•62 comments

The Church Rock Uranium Mill Spill

https://en.wikipedia.org/wiki/Church_Rock_uranium_mill_spill
13•Sir_Twist•2d ago•1 comments

Mozilla's opposition to Chrome's Prompt API

https://github.com/mozilla/standards-positions/issues/1213#issuecomment-4347988313
512•jaffathecake•13h ago•197 comments

Spain's parliament will act against massive IP blockages by LaLiga

https://www.democrata.es/en/politics/congress-and-senate/congress-will-act-against-massive-ip-blo...
329•akyuu•5h ago•153 comments

10Gb/s Ethernet: what I did to get it working in my home

https://www.gilesthomas.com/2026/04/10g-ethernet-what-i-did
96•gpjt•1d ago•73 comments

Recovering files from beyond the grave using PhotoRec

https://lost-number.bearblog.dev/recovering-files-from-beyond-the-grave-using-photorec/
28•speckx•3h ago•5 comments

How Semiconductors Were Made in America

https://www.siliconimist.com/p/semiconductors-made-in-america
26•johncole•2d ago•15 comments

The upsell game – Vercel upselling tactics revealed

https://theupsellgame.com/
14•bartoindahouse•1h ago•0 comments

A 1960s art school experiment that redefined creativity

https://thereader.mitpress.mit.edu/the-1960s-art-school-experiment-that-redefined-creativity/
63•pseudolus•5h ago•18 comments

Hackers are actively exploiting a bug in cPanel and WHM

https://techcrunch.com/2026/04/30/hackers-are-actively-exploiting-a-bug-in-cpanel-used-by-million...
4•dotmanish•24m ago•0 comments

American Dads Became the Parents Their Fathers Never Were

https://www.derekthompson.org/p/why-do-richer-dads-spend-more-time
30•ozozozd•4h ago•9 comments

Granite 4.1: IBM's 8B Model Matching 32B MoE

https://firethering.com/granite-4-1-ibm-open-source-model-family/
259•steveharing1•10h ago•163 comments

The Human Creativity Benchmark – Evaluating Generative AI in Creative Work

https://contralabs.com/research/human-creativity-benchmark
12•0bytematt•2h ago•1 comments

1.4 GW: battery storage at former Grohnde nuclear power plant

https://www.heise.de/en/news/1-4-GW-Huge-battery-storage-at-former-Grohnde-nuclear-power-plant-11...
47•pantalaimon•9h ago•52 comments