The 12.0 open-source release of the Citus database extension to #PostgreSQL is out!
Marco Slot in his post introduces schema-based sharding, goes into detail of sharding model tradeoffs, & even covers the extended PG MERGE support in this release:
https://www.citusdata.com/blog/2023/07/18/citus-12-schema-based-sharding-for-postgres/
Personally, I see this release as a major milestone for Citus. The list of changes may not be long, but actually introducing a whole new sharding model enables new types of workloads that were either very hard or near impossible to achieve with Citus.
While row-based sharding is still the most efficient both in terms of hardware margins (densely packing tenants on nodes) and performance - it did require a lot of up-front work to adapt schemas and apps to this model.
What types of apps had it hard?
One obvious app is actually regular multi-tenancy. The customer is always right, and sometimes your customers don't want to upgrade on the same pace as everyone else. There are also cases when some of them require individual schema changes.
With row based-sharding you share the schema, so individual touches like that are hard or impossible.
The second type of apps are #microservices, by definition they want to own the storage and handling storage in them is one of the main problems: https://stackoverflow.blog/2020/11/23/the-macro-problem-with-microservices/
Citus solves that now, with schema based sharding it's very easy to implement microservices: https://docs.citusdata.com/en/v12.0/get_started/tutorial_microservices.html
This allows easy horizontal scaling of storage, while giving these apps the autonomy they desire.
Best part however is: you can do both. Deploy with schema-based sharding and migrate parts of your app (or whale tenants) to the row-based sharding model.
All of this was developed 100% in the open. If you starred our GitHub repo, you saw it made live: https://github.com/citusdata/citus