Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does that give you a row-level lock that extends through the chain of referential integrity, for the Order?


No. These advisory locks don't know anything about what you are locking. You name and you use the lock, not the RDBMS. That is you could give the lock the name `my-silly-lock-name` and that would totally work. As long as two bits of your code use the same lock name, they'll be executed in series. Hell, the code inside the code guarded by these locks doesn't even have to touch the DB. This is like a separate service your RDBMS provides that doesn't touch any tables, sequences, etc.

Essentially these are mutexes identified by strings that are managed by your RDBMS. That's all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: