logoalt Hacker News

lmmyesterday at 11:21 PM5 repliesview on HN

I mean you're not really making use of MVCC etc. at that point. Foreign keys are far less relevant because your transactions are all fully atomic, so it doesn't really matter if your data is in an inconsistent state in the middle of a transaction, and conversely you've got no risk of e.g. adding a reference to a row that another transaction deleted concurrently. Why not just use e.g. Redis at that point?


Replies

zadikiantoday at 6:18 AM

Cause I want relations and SQL. But also I kinda get what you mean and would not use serializable in Postgres.

mamcxtoday at 12:23 AM

This is a misunderstanding of what serializable in an ACID datastore does, neither that trust developers without FK is always trouble, and that the suggestion of Redis show how much is lost here.

Big point: Serializable not exist alone in a decent ACID datastore, and no, less strict rules for the MOST important thing you have(your data) is NOT a good idea.

Over and over again Acid RDBMS have proven that trying to "relax" the rules in pursuit of performance or worse, mystical holy grails that have never been right or correct for a primary datastore, is a mistake. And then people goes back to them, because is the best tool for ALL the primary data store jobs. ALL OF THEM.

Is like the mythical C developer that "not need safety", that at least has more chance of be possible (after MANY passes over the code) that a datastore without safeguards.

show 1 reply
trumpdongtoday at 1:35 AM

Serializable doesn't mean serialized. It means if two transactions access the same data, one must be delayed or aborted. It doesn't mean they all wait for each other.

lukas221yesterday at 11:29 PM

people mostly use RDBMS because they want the advanced querying that SQL provides, not because of the isolation levels

but ignoring that, serializable isolation level means the database acts AS IF the transactions are serial. but most databases in fact will execute them concurently, with careful tracking to make sure they appear serial

show 1 reply
vlovich123today at 2:15 AM

MVCC is not inherently non serializable. For example, Postgres adds serializability on top through SSI.