Re:Lessons learned from sharding Postgres at Notion
by nicoburns on Thursday October 07, 2021 @03:11AM
(#28783174)
Seems like something that might still be worth exploring, as if I’m thinking about this correctly, it would allow you to create new shards on the fly, and to migrate workspaces between shards while only locking one workspace at a time, and only for the amount of time required to catch up that single workspace.
At the end of the day, this is something we could have explored in more depth, but we were ultimately comfortable with the risk tradeoff of migrating all users at once vs. the consequences of depending on the monolith for longer, largely thanks to the effort we put into validating our migration strategy.
[0] https://blog.sentry.io/2015/07/23/transaction-id-wraparound-...