Skip to content
Advertisement

Tag: transactions

EF Core transaction lifetime

We are using our select statement inside transaction scope because of concurrency concerns. The question is, if I put my transaction in using statement, do I still have to call Commit() method explicitly to be sure that the transaction is closed or Dispose() method will do the job? Here’s example code: Answer The official docs would be your best friend

PostgreSQL: deadlock without a transaction

I have a route (in a node JS app) that inserts and updates some data in a PostgreSQL database (version 13). In pseudo-code, here are all queries that are done in sequential order: On some instances of the app without that much traffic that writes on their own table, I have many deadlocks. I don’t understand why since there is

SQL – on which context do SELECT…FOR UPDATE and UPDATE work?

I would like to have a question about data contexts on which do the transaction operate with different commands. Are there any differences in SELECT…FOR UPDATE and UPDATE in terms of contexts of data? What I mean by this: if I run the following transaction (pseudo-code): What this actually does is that it locks the user in exclusive mode and

Advertisement