2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 20:16:44 +00:00

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 # https://docs.djangoproject.com/en/3.2/ref/databases/#isolation-level
if "isolation_level" not in db_options: if "isolation_level" not in db_options:
serializable = _is_true( serializable = _is_true(
os.getenv("INVENTREE_DB_ISOLATION_SERIALIZABLE", "true") os.getenv("INVENTREE_DB_ISOLATION_SERIALIZABLE", "false")
) )
db_options["isolation_level"] = ( db_options["isolation_level"] = (
ISOLATION_LEVEL_SERIALIZABLE ISOLATION_LEVEL_SERIALIZABLE