Comment by aeyes

6 hours ago

> you should own that layer yourself inside of your infrastructure

Unless you have millions of users, you don't really need this. It would be nice to have but its not a pressing need. So why invest into developing something that you only need once you are at massive scale? At this point you might as well switch away from Postgres because you'll surely have the manpower to do it.

Even with a proxy like PgDog the Postgres sharding story isn't solved. Resharding with logical replication is unlikely to work with databases which are already TBs in size. I never got it to catch up, I had to sync data at the filesystem level which is terrible. Tools like pg_repack also fall apart at scale.

For those that get to a point where a sharding proxy is required, switching databases is a very appealing solution.

And for those that are almost there, application side sharding is more flexible than building a query routing proxy.

Doesn’t PgDog also handle the sharding by proxying the writes? Maybe I missed something but I thought this is their value prop. It’s not just another PgBouncer.

  • From the docs you have to tell it which shard to access - it doesn't automagically rewrite your statements.