Skip to content

Commit 15c9db4

Browse files
jensensclaude
andcommitted
Highlight pgjsonb as optimized for cloud-native environments
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 04e0075 commit 15c9db4

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

docs/sources/explanation/storage-backends.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ page explains the four storage backends supported by
1414
| **direct** (filestorage) | Development, single-process | No (single process only) | Yes (built-in) | None |
1515
| **relstorage** (PostgreSQL, MySQL, Oracle, SQLite) | Production, horizontal scaling | Yes (multiple app processes) | Optional (history-preserving mode) | RDBMS server |
1616
| **zeo** | Production, moderate scaling | Yes (multiple app processes) | Yes (built-in) | ZEO server process |
17-
| **pgjsonb** | SQL-queryable ZODB, modern stacks | Yes (multiple app processes) | Optional (history-preserving mode) | PostgreSQL 14+ |
17+
| **pgjsonb** | Cloud-native, SQL-queryable ZODB | Yes (multiple app processes) | Optional (history-preserving mode) | PostgreSQL 14+ |
1818

1919
## Direct filestorage
2020

@@ -101,6 +101,8 @@ between Python pickle format and JSON.
101101

102102
**When to use it:**
103103

104+
- Cloud-native deployments where a managed PostgreSQL service (RDS, Cloud SQL,
105+
AlloyDB, etc.) replaces local filestorage and blob directories
104106
- When you want to query ZODB data directly with SQL/JSONB operators
105107
- Modern PostgreSQL-centric architectures
106108
- Integration with tools that consume JSON natively (analytics, reporting)
@@ -128,7 +130,7 @@ For most teams, the decision comes down to:
128130
1. **Development or single-process?** Use `direct`.
129131
2. **Need multi-process with an existing RDBMS?** Use `relstorage`.
130132
3. **Need multi-process, prefer ZODB-native simplicity?** Use `zeo`.
131-
4. **Want SQL-queryable ZODB data on PostgreSQL?** Use `pgjsonb`.
133+
4. **Cloud-native or want SQL-queryable ZODB data on PostgreSQL?** Use `pgjsonb`.
132134

133135
All four backends support the same ZODB API, so switching between them is a
134136
configuration change (plus data migration). Your application code does not

docs/sources/reference/database-pgjsonb.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
<!-- diataxis: reference -->
44

55
[zodb-pgjsonb](https://pypi.org/project/zodb-pgjsonb/) is a ZODB storage
6-
adapter that stores object state as PostgreSQL JSONB with binary blobs in
7-
PostgreSQL bytea (or optionally tiered to S3-compatible object storage). It
8-
uses [zodb-json-codec](https://pypi.org/project/zodb-json-codec/) for
9-
Rust-based pickle-to-JSON transcoding.
6+
adapter optimized for cloud-native environments. It stores object state as
7+
PostgreSQL JSONB with binary blobs in PostgreSQL bytea (or optionally tiered
8+
to S3-compatible object storage), making it a natural fit for managed
9+
PostgreSQL services (RDS, Cloud SQL, AlloyDB, etc.). It uses
10+
[zodb-json-codec](https://pypi.org/project/zodb-json-codec/) for Rust-based
11+
pickle-to-JSON transcoding.
1012

1113
:::{note}
1214
Blobs are handled differently from RelStorage and ZEO. The `db_blob_mode` and

0 commit comments

Comments
 (0)