3 ms·
Consistency is a property of distributed databases. Stock Postgres is not distributed, and thus gets strong consistency for free. There is still a concept of (
by jeremyjh 3y ago
Consistency is a property of distributed databases. Stock Postgres is not distributed, and thus gets strong consistency for free.
There is still a concept of (transaction) isolation levels, and the ANSI SQL standard defines a transaction mode READ UNCOMMITTED that could give you inconsistent results, but Postgres ignores that and treats it as READ COMMITTED.
- _m8fo 3y agoYeah you are right - I thought the primary in this case was distributed since most of the shims were (CouchDB, Mongo, etc).
- qaq 3y agoin terms of ACID "Consistency ensures that a transaction can only bring the database from one consistent state to another, preserving database invariants: any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. This prevents database corruption by an illegal transaction. Referential integrity guarantees the primary key–foreign key relationship." So no it's not free
- jeremyjh 3y agoThat is an entirely different meaning of consistency. GP was talking about CAP theory, as they acknowledged in a follow-up comment.