Skip to main content

A backend for ZODB that stores pickles in a relational database.

Project description

RelStorage is a storage implementation for ZODB that stores pickles in a relational database (RDBMS). PostgreSQL 10 and above, MySQL 5.7.19 / 8.0, Oracle 10g and above, and SQLite 3.8.3 and above are currently supported. RelStorage replaced the PGStorage project.

Features

  • It is a drop-in replacement for FileStorage and ZEO, with several enhancements:

    • Supports undo, packing, and object history preservation just like FileStorage.

    • RelStorage can be configured not to keep object histories for reduced disk space usage and improved performance.

    • Multiple processes on a single machine can read and write a local ZODB database using SQLite without needing to start and manage another process (i.e., ZEO).

    • Blobs can be stored on a shared filesystem, or (recommended) in the relational database and only cached locally.

    • Multiple threads in the same process share a high-performance in-memory pickle cache to reduce the number of queries to the RDBMS. This is similar to ZEO, and the ZEO cache trace tools are supported.

    • The in-memory pickle cache can be saved to disk and read when a process starts up. This can dramatically speed up site warmup time by eliminating a flood of RDBMS queries. Unlike ZEO, this cache is automatically shared by all processes on the machine (no need to configure separate client identifiers.)

  • Ideal for large, high volume sites.

    • Multiple Python processes on multiple machines can read and write the same ZODB database concurrently. This is similar to ZEO, but RelStorage does not require ZEO.

    • Supports ZODB 5’s parallel commit feature: Database writers only block each other when they would conflict (except for a small window at the end of the twophase commit protocol when the transaction ID is allocated; that still requires a global database lock).

    • According to some tests, RelStorage handles concurrency better than the standard combination of ZEO and FileStorage.

    • Whereas FileStorage takes longer to start as the database grows due to an in-memory index of all objects, RelStorage starts quickly regardless of database size.

    • Capable of failover to replicated SQL databases.

  • Tested integration with gevent for PostgreSQL, MySQL, and SQLite.

  • There is a simple way (zodbconvert) to (incrementally) convert FileStorage to RelStorage and back again. You can also convert a RelStorage instance to a different relational database. This is a general tool that can be used to convert between any two ZODB storage implementations.

  • There is a simple way (zodbpack) to pack databases.

  • Supports zodburi .

  • Free, open source (ZPL 2.1)

Features Supported by Databases

Some of RelStorage’s features are only supported on certain versions of certain databases. If the database doesn’t support the feature, RelStorage will still work, but possibly with a performance penalty.

Supported Features

Parallel Commit

Shared readCurrent locks

Non-blocking readCurrent locks

Streaming blobs

Central transaction ID allocation

Atomic lock and commit without Python involvement

PostgreSQL

Yes

Yes

Yes

With psycopg2 driver

Yes

Yes, except with PG8000 driver

MySQL

Yes

Yes

Native on MySQL 8.0, emulated on MySQL 5.7

No, emulated via chunking

Yes

Yes

Oracle

Yes

No

Yes

Yes

No (could probably be implemented)

No (could probably be implemented)

SQLite

No

No

N/A (there is no distinction in lock types)

No, consider using a shared-blob-dir

N/A (essentially yes because it happens on one machine)

No

Documentation

Documentation including installation instructions is hosted on readthedocs.

The complete changelog is also there.

https://readthedocs.org/projects/relstorage/badge/?version=latest

Development

RelStorage is hosted at GitHub:

https://github.com/zodb/relstorage

Continuous integration

A test suite is run for every push and pull request submitted. GitHub Actions is used to test on Linux and macOS, and AppVeyor runs the builds on Windows.

https://github.com/zodb/relstorage/workflows/tests/badge.svg https://ci.appveyor.com/api/projects/status/pccddlgujdoqvl83?svg=true

Builds on CI automatically submit updates to coveralls.io to monitor test coverage.

https://coveralls.io/repos/zodb/relstorage/badge.svg?branch=master&service=github

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

RelStorage-3.5.0.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

RelStorage-3.5.0-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

RelStorage-3.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.12+ x86-64manylinux: glibc 2.5+ x86-64

RelStorage-3.5.0-cp310-cp310-macosx_10_15_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

RelStorage-3.5.0-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

RelStorage-3.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64manylinux: glibc 2.5+ x86-64

RelStorage-3.5.0-cp39-cp39-macosx_10_15_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

RelStorage-3.5.0-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

RelStorage-3.5.0-cp38-cp38-win32.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86

RelStorage-3.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64manylinux: glibc 2.5+ x86-64

RelStorage-3.5.0-cp38-cp38-macosx_10_15_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

RelStorage-3.5.0-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7mWindows x86-64

RelStorage-3.5.0-cp37-cp37m-win32.whl (1.1 MB view details)

Uploaded CPython 3.7mWindows x86

RelStorage-3.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64manylinux: glibc 2.5+ x86-64

RelStorage-3.5.0-cp37-cp37m-macosx_10_15_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

RelStorage-3.5.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64manylinux: glibc 2.5+ x86-64

RelStorage-3.5.0-cp27-cp27m-macosx_10_14_x86_64.whl (1.1 MB view details)

Uploaded CPython 2.7mmacOS 10.14+ x86-64

File details

Details for the file RelStorage-3.5.0.tar.gz.

File metadata

  • Download URL: RelStorage-3.5.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.6

File hashes

Hashes for RelStorage-3.5.0.tar.gz
Algorithm Hash digest
SHA256 46906cf2395f4ff5ae6f480d5e3f1c31f987657ceb083e67990d20119aa79b72
MD5 db13424ecc1447a874948506728d37cf
BLAKE2b-256 1f9b55a8ab9f50ae6d48fb2a6d4d012a8a2ad8e3e7caa4503752e073f0e100e6

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: RelStorage-3.5.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for RelStorage-3.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d25d17791b741ea13c721901e0a01d90484ff57c37cfd34ae2c421afac14a09e
MD5 a4beb247106a44d449bff2476bf5c85a
BLAKE2b-256 b1273e341dc4db689e479ed6f80c59ed37f5098051c99c09d95ca6686138bcc8

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 eb3f2f561451aa8857b78536fd3d5b54432ebad50df01d0a2ec7a9d751e048ed
MD5 82f1a66b5b91ce1387a8c6134f285148
BLAKE2b-256 632fb8ea21596b6956c9d9e899eaeef441c524f5be78a4aaf9ea44e6edb52cb6

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 54abd34990375e65646ae12362abde89ed68180ea19a28091e8a8f1c0170f941
MD5 ea57c6d4c86e60a3a82909046e431642
BLAKE2b-256 514460f1306c4e97b3c253d1a2614da57b0c77272171a36b7e003c4522b4fd18

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: RelStorage-3.5.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for RelStorage-3.5.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 db3c4eac158dd2c26b752bf70c3ef63799861da8859672a938b10a99dc39b3e4
MD5 e92f8d563a8c96cdc57509d3f3d1ff7a
BLAKE2b-256 01366a933652b98032bdfafb92ad0f3dce9385afadb1e74812798d07de9d8679

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bc6b491c0042c02edf59a7d5b0a262867b9d3a436f482aaad482f7904bf038f4
MD5 5320b6c95835630d788844bc11792c15
BLAKE2b-256 d6d37fab0b59fdbfef52fae00803b1328c5e1d0055887829b0847dc845f0bbd3

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b57310b13568517633966737988941d35d2f5eca5af2a2adad2ef32e492f2bcc
MD5 6d8acb4603a3bf33f6f5a307fc32ccf8
BLAKE2b-256 85124b03a7713cd125ddeacf6a86c488390b1dcdb6c6bdcf5150530713f14e02

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: RelStorage-3.5.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.0

File hashes

Hashes for RelStorage-3.5.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 964520804edbc46e891426ac92a648b87250b26d8eb3806d85eb93a022b1b413
MD5 8e4886fd77cadd788d980431505140df
BLAKE2b-256 96b4e54ace5c7b180a663beede5959a4ae311047bafcf271dd6f2a8de3293b1d

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp38-cp38-win32.whl.

File metadata

  • Download URL: RelStorage-3.5.0-cp38-cp38-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.0

File hashes

Hashes for RelStorage-3.5.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 1753806421c9c8ea68aa91c124485ed838e53a92c3be0d9ec05cd1ef70caf1a6
MD5 a60334934cb9094a18fd9d78243b7823
BLAKE2b-256 3e56344402d9d23506a87166a24659091c9cab2ad823ff058e133aeecf270c8d

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c6ab0f88fb8c9189dd7e4200994674c8242b2bccce5ab40ad43a7a3434d9d62f
MD5 49738235f162fd3f317f7447d9172a4e
BLAKE2b-256 cb9f260a3e0e32c9cea91c6101d14937671ece731bb72e4746d874a715a7537f

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 481ce5ac761b22941e1a33f368f4c6a5d3a263ab4dc4a6d5c3d4329483ee5659
MD5 efcf4c82555e9f19fa5087466591ac68
BLAKE2b-256 ed5c9ff95bf661f7e7a2b788571a2032977b9be44b1032684b63d893c4955849

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: RelStorage-3.5.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.5

File hashes

Hashes for RelStorage-3.5.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 537e82ea31b9ea9a6fdc833998992080e55f30b5204e0ec99b8818e83846456e
MD5 e57efaeef650e738958c99baa7e73a3b
BLAKE2b-256 d382ee8bf1e6c41fa200cae083eb4f0c608552f5d9dcd4bcead2e8a5398d0773

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp37-cp37m-win32.whl.

File metadata

  • Download URL: RelStorage-3.5.0-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.5

File hashes

Hashes for RelStorage-3.5.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 db47cd34f5b4c9ea002f2cbbc7a30a1099a67c826f361d94bc87e28180c4b336
MD5 ce2013587676c9de95feeda3edce45f7
BLAKE2b-256 240811991473271d8ebe64fc21c00a761383ab06648e587c109d1bb8fa043a18

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8f7488be185705e697b33094ab56d08a5c5d93bfc8c95bafbc4f41604ed0de5a
MD5 228ce63b2e6a862b3270f0a3a1bf83c3
BLAKE2b-256 98da5bc58488501214d5a452f462a1eba88feef2acfd240be4024029737a32be

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e982ab007000dca9d1690cad03e56906dd678dd05c425f14801813621141ae9c
MD5 93d325d1c4c6898d129398fdec05544c
BLAKE2b-256 b532e4a59e3c22b17215f6ccc044974a4a8f49f74554c7f32fa95fd19ad70dd5

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for RelStorage-3.5.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4b6bdfc2b7103ac99cc0d8f722176dff4e714e0e21ef669df2827c1ac15eb1a9
MD5 8575ab4865dfd9e9c6d287446013998f
BLAKE2b-256 3f64d69e749fbb2702e60702cb4221a5038599b8dc2004f5bbfd68f16927fd92

See more details on using hashes here.

File details

Details for the file RelStorage-3.5.0-cp27-cp27m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: RelStorage-3.5.0-cp27-cp27m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 2.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for RelStorage-3.5.0-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 6a278a1eb0a151499d279832499e2a6877cdf2843d4c404aa23d5708ed827ea1
MD5 396a644cbd50f7897fe300c3d6199a94
BLAKE2b-256 451a6dbfc74828bd2be2e5f90bf062d6a6bbdd5bd3fc15b2f92f73fd18d9109a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page