How to use SELECT FOR UPDATE of postgres to avoid logical race conditions? #1337
Unanswered
MiniSuperDev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a similar use case like this: https://on-systems.tech/blog/128-preventing-read-committed-sql-concurrency-errors/
Currently I use a mutex in my node main process, but I think is better to move this to the db.
If is possible can you show me a minimal example
Thank you so much
For example how to do this statement?
I tried with this, but this is called 50 times but only increment the counter 1 time, not like the expected behavior
Beta Was this translation helpful? Give feedback.
All reactions