Separate shared database implementation from crate exports

This commit is contained in:
2026-11-30 04:35:54 +08:00
parent 81b70f0046
commit 6c51e68817
8 changed files with 398 additions and 391 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ Bedrock stores JSON documents in SQLite, PostgreSQL or MySQL. Each backend has i
## Storage boundaries
`db` owns the transactional document data, revisions, and snapshots used by the application. `clusters` resolves deployment settings. The `db` connection module selects the SQL driver and read endpoints.
`db` owns the transactional document data, revisions, and snapshots used by the application. `clusters` resolves deployment settings. The `db` connection module selects the SQL driver and read endpoints. The backend modules share the connection pools and transaction implementation in `store.rs`.
Notion describes sharding online PostgreSQL block data by workspace and feeding a downstream S3 data lake from PostgreSQL changes. Bedrock currently supports selecting a configured SQL cluster and using its read replicas. Workspace sharding, S3 object storage, and data-lake ingestion are future work. [Notion's PostgreSQL sharding](https://www.notion.com/blog/sharding-postgres-at-notion) · [Notion's data lake](https://www.notion.com/blog/building-and-scaling-notions-data-lake)