Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How is (a) wrong? Pg doesn't horizontally scale like Mongo does


Between plain old horizontal scaling via custom sharding, replicas, and extensions like Citus and Timescale that offer full horizontal scalability, Postgres is handling some of the biggest use cases in the world.


It's simply a fact that Postgres does not offer out of the box scaling like MongoDB.

Postgres does have things like Citus, or even wire-protocol compatible things like CockroachDB that do scale, but those are not Postgres.

It's the same situation with MySQL vs. Vitess.


> but those are not Postgres.

sure, citus is an extension of postgres and part of ecosystem.


And it comes with a bunch of caveats. It's bolted-on horizontal scaling, vs MongoDB where that's the main feature. Yes I still prefer Postgres in general, but it's fair to point out that weakness of it.


Citus was acquired by Microsoft so there are doubts about its future longevity given that so many similar promises of ongoing support are rarely maintained. Timescale is optimised for time-series so not sure it's applicable.

Point still remains that PostgreSQL lacks a modern, built-in horizontal scalability solution.


>given that so many similar promises of ongoing support are rarely maintained

Microsoft on the other hand is among the best in keeping such promises.

If Google had bought it, sure...


Well let's see how long Google's Spanner lasts. It's designed to support huge-scale systems, and personally I'd be terrified locking a huge system into that.


Cockroachdb is a common solution here.


It's not Postgres, it only speaks Postgres dialect.


but it is not pgsql, and doesn't have drop in compatibility..


Okey, maybe I do not understand something but how is https://neon.tech not auto-scaling? Or the more expensive option at AWS Aurora?


> not auto-scaling?

The writes aren't. There's no sharding for example. You can ever only have 1 primary writer.


Fair, but this is getting fixed. Postgres 16 (which was just released) adds an origin tag to logical replication, so that you can know whether or not to pass on a change (and avoid having an infinite loop where a change is replicated back and forth). That's the first step to having multiple mains. I think in theory, if you had deep Postgres knowledge, you could set up a high touch, bespoke multi-main deployment today.

I expect the replication story with Postgres will get much better over the next few years.


This is not Postgres. It's a managed instance, but isn't built in.


> Pg doesn't horizontally scale like Mongo does

At what cost though? Does 1 Pg server = 1 Mongo server for the same specs or do you need a lot more Mongo servers?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: