Tag Archives: sequelize

Illustrating write skew in Postgres with Repeatable Read (Snapshot Isolation)

In this post we will see write skew in action using Node.js, Postgres and Sequelize. We will use the example given in wikipedia where there are two accounts (tables) V1 and V2 with a single balance column. The tables are … Continue reading

Posted in Computers, programming, Software | Tagged , , | Leave a comment

Handling Postgres Serialization errors in Sequelize

When using the REPEATABLE READ or SERIALIZABLE isolation levels, you should be prepared to handle serialization (error code 40001) and deadlock failures (error code 40P01) in your code. Well this is how you do it: where That’s it for this … Continue reading

Posted in Computers, programming, Software | Tagged , | Leave a comment

Guide to using Sequelize with Postgres

Note that you can JOIN tables with Sequelize without creating foreign keys. Refer this. Further Reading

Posted in Computers, programming, Software | Tagged | Leave a comment