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 9.6 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 and MySQL.
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.
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.
Development
RelStorage is hosted at GitHub:
Continuous integration
A test suite is run for every push and pull request submitted. Travis CI is used to test on Linux, and AppVeyor runs the builds on Windows.
Builds on Travis CI automatically submit updates to coveralls.io to monitor test coverage.
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
Built Distributions
Hashes for RelStorage-3.0rc1-pp271-pypy_41-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 190618fe75483e347aac8a9286f3ff5883706249344f4175abcdd60da26df718 |
|
MD5 | ac2f459351eb32dfce4b800ea9d408ca |
|
BLAKE2b-256 | d323ebc6894c03b12885186a401e5644847f226208e92d49f34aedd4c52d417e |
Hashes for RelStorage-3.0rc1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82300e07a86abb6024696f35c55ad71c5a09247c2b05c69dc7465c028eb860c6 |
|
MD5 | 186223aa337fab06d10635ceab329eb6 |
|
BLAKE2b-256 | 677b249e14beb79028a94ebe8ce5922469ad43e52b7556e7ff5aabdefcccd742 |
Hashes for RelStorage-3.0rc1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f6d75ffdf15e7b65763bf5b704bb3831e8a991e5d7534f6d08ea9c6565b1e4a |
|
MD5 | fab7898d865f54f2c5475a18ac67ee67 |
|
BLAKE2b-256 | a19bc32a273a195d2d258e34d986bb20ddbc2b414d317f6ef5d9d77fcc969afa |
Hashes for RelStorage-3.0rc1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 598a4bdb13c74acdf00961a681c424532032269dc23a1eb555c3f36167787b73 |
|
MD5 | f1bc203e76f114c11dcda1e6f76dc8eb |
|
BLAKE2b-256 | c667f4996219fba814d55731bd001594b2c3cdb0d13093935da3db514414b236 |
Hashes for RelStorage-3.0rc1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b19684483df4a6abe66d3caaf840683b9566be05048b6d68f2bd648b86f2f2f |
|
MD5 | 18194f03496b0fc6301b5e52081ca641 |
|
BLAKE2b-256 | 5732c1470ab86c1e05242b0bb459835bfece30cb8e0f4476a9dc393af7b926af |
Hashes for RelStorage-3.0rc1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5859d09fab2cdb7a524c7b6065c45f926984fbb4cfae0fd265c823240be30b95 |
|
MD5 | 215082970e5efbb408b3c527fb919d1a |
|
BLAKE2b-256 | 2bfcd15a1e074364423aae11dd980dfd4306b731226978f4ba47bec6f27e8619 |
Hashes for RelStorage-3.0rc1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f5c769c136dd99c2a1aef2fea819e7855ec42d9d88fa115e0efb09a724aceca |
|
MD5 | c0ddd57d85bcda1b9e5a51cb8fd1c037 |
|
BLAKE2b-256 | d69f413a40ee8afcd6a88f4c7367f91624deee0f6b9921db58f89bc2d5271edd |
Hashes for RelStorage-3.0rc1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f2f17ff676d84ec3c8c035ded511614e55bbef58c844adb67e5b232d9f04377 |
|
MD5 | 9712807da6bcdbda06e14289abd79df5 |
|
BLAKE2b-256 | d70afcfca17911cf8ba5888b4738d8be8c055f1ed450a19594c1f536a6f359d1 |
Hashes for RelStorage-3.0rc1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d03f6755a08317fbc71d5f429444e81cdd54eef5b2bd9ea849ee2024fe9bca7e |
|
MD5 | 34264142b956e57ed2d17b9dc1d9b0b9 |
|
BLAKE2b-256 | b936e2c86c9214d51eec17abeecf58085b6d4847e07de32d223c1d1a0b55628f |
Hashes for RelStorage-3.0rc1-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35918ac486aabdd0adeb74bfe49995a23da3d478def6f649b0a068c6ffa9908b |
|
MD5 | e9f0e638c8748ee0927fdb855cbd9985 |
|
BLAKE2b-256 | 2771205ad13f334fd74cec09790d2a8fd03d175b27b7ecf9c384c7a0be555c86 |
Hashes for RelStorage-3.0rc1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dadc95b05c03d8a96284d64142b8e71056d4b9d179c187bea0b6dd624f65c68 |
|
MD5 | 68bbc518d76ba7db503aa0d266c66f43 |
|
BLAKE2b-256 | 87b147a4fef9d3b995ce77e6b4e3092caff8014667eeb5ed60cd1eea6b6402b4 |
Hashes for RelStorage-3.0rc1-cp34-cp34m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4f713db6d4d3de1de14edc5069b2d4e5e4fcbf78357d80775470f2968962a79 |
|
MD5 | 074b6b6e65cdf949661c3ede39627329 |
|
BLAKE2b-256 | 401932b79a313b72991a33b8820d71311885c209ec108de852dbfaa6a1003974 |
Hashes for RelStorage-3.0rc1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ace943ec79326f6a954ce7073cd3dd31afe132269106dda79a8a3f5084417ee5 |
|
MD5 | 7046a8804eaf42952dfd6d749d60c813 |
|
BLAKE2b-256 | ed413c06b34b1109ab98b5df0bb461485f209932dec5041ca5290644ce360c2b |
Hashes for RelStorage-3.0rc1-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f25d31160ed5554aa821c2c1b1ada271b9dad40565cb5f3749c5bd453db4ec7 |
|
MD5 | ddaa7736195d59c897ae8bc0f214203b |
|
BLAKE2b-256 | 85dd9e822d6c587aa904d4f671e7892137b5578b6a58173707260db2d56f5e8a |
Hashes for RelStorage-3.0rc1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1da605ed8e9de9681b1d74f9d50c6d3fbff2fd67e80f2394970f6e7b1774df55 |
|
MD5 | a816786f6b95715d64e026c740b6b211 |
|
BLAKE2b-256 | b730204fdea13f044d65083abb7c9af7f6980af2eaeaccc7ff5debbe77b99064 |
Hashes for RelStorage-3.0rc1-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d97128378317390d423449449abfae4c3627d8e1779448f50e5ab1151953d6fc |
|
MD5 | 375a277ccc6c26b561b8a9c7c02b7cfa |
|
BLAKE2b-256 | ed3ad1b1d6a5b182904986fb64ebceb5776803de57c3a3a868c329dee855cb73 |
Hashes for RelStorage-3.0rc1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7bb8b3fe45ad478ca0396dcf7d040e18424048114e9bbfd973cf4e441ce8b8 |
|
MD5 | 65711e7a3dbc1208c649189529cf4c63 |
|
BLAKE2b-256 | cb2e30773537b107f0563986a96b231bb9c8e1281ced4a64a14ea265d833600f |
Hashes for RelStorage-3.0rc1-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c5fee1e1e91538eb6a23a2de20479ab178ca4d149b21d55ca60d133f8a3d702 |
|
MD5 | a4e01a3bc9af88f5c11333b6a68a06b2 |
|
BLAKE2b-256 | fd2e1ec4376c75ec47312e8544c81132e39aa21f234047c983204b6e4c294d57 |