Change the default serialization level for postgresql DB (#3268)

- Previously defaulted to SERIALIZABLE
- Now defaults to READ_COMMITTED
This commit is contained in:
Oliver 2022-06-29 07:27:35 +10:00 committed by GitHub
parent cf70e4220f
commit 26d5d15b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,7 +531,7 @@ if "postgres" in db_engine: # pragma: no cover
# https://docs.djangoproject.com/en/3.2/ref/databases/#isolation-level
if "isolation_level" not in db_options:
serializable = _is_true(
os.getenv("INVENTREE_DB_ISOLATION_SERIALIZABLE", "true")
os.getenv("INVENTREE_DB_ISOLATION_SERIALIZABLE", "false")
)
db_options["isolation_level"] = (
ISOLATION_LEVEL_SERIALIZABLE