ACID properties

Hi all,

I’m working on a Django based web application and I’m wanting to make my Django database (Postgres) transactions ACID compliant. However I’m wondering if this is fully achieved by using transaction.atomic and select_for_update?

From my understanding this ensures atomicity, isolation and consistency at the very minimum but I’m having a hard time understanding if they both provide all ACID properties. If not, what steps can I take to achieve those 3 properties? Any thoughts and explanations would be much appreciated, thank you!

1 Like

The short answer is yes, appropriate implementations of atomic transactions can ensure ACID properties.

See the docs page for Transactions for all the information about .atomic and the other features available for managing transactions.

It may also be worth your time to review the PostgreSQL docs on Transaction Isolation to see where select_for_update fits into the picture. (Whether you want to use select for update or repeatable read is a business decision that you ought to make if you consider this to be an important issue.)

1 Like