Record Locking Postgres

Das Goravani goravanis at
Sun Jul 3 15:12:16 UTC 2022

(Multi user Javascript Client context)

With Postgres, I thought to lock records you have to do a SELECT ….FOR UPDATE

I thought that was the only way to place a lock on the record you selected

Now another experienced developer has told me that with Postgres you don’t have to lock records, that it handles multi user situations automatically. 

So which is it, do you need to do "FOR UPDATE" or not?

And further, if you are editing a record and then you CANCEL, how do you REMOVE the lock you previously placed with FOR UPDATE?

More information about the omnisdev-en mailing list