3 ms·
If only there are tools for sharding PostgreSQL. Easy sharding is still a major weakness in relational databases.
by asomiv 15y ago
If only there are tools for sharding PostgreSQL. Easy sharding is still a major weakness in relational databases.
- narrator 15y agoSharding with triggers is possible. It really helps that PGsql has Transaction DDL. If you need to create a new shard and rename the database table underneath, you can do it all in a transaction.
- asomiv 15y agoSharding is not as easy as just spreading the data over shards. That's the easiest part. I also have to be able to add shards without breaking things and be able to move a shard or a part of a shard elsewhere.
- moe 15y agoSQLalchemy (the orm that they're using) actually comes with some nice sharding hooks and examples. I used to complain about the lack of "out-of-the-box" sharding middleware myself, but came to realize that this is really something that belongs in the application layer for all but the most trivial use-cases. However, there is no reason why full-stack frameworks such as Django and Rails couldn't grow meaningful sharding support.
- zzzeek 15y agoWe've got a rudimental hook sure, but it's not what I'd call "easy"...it still needs to be attended to with custom logic anytime you need to cross shard boundaries.
- moe 15y agoI've been there, so can confirm it's not "easy". But at least it gave me starting point, which is already more than most other ORMs can offer.