Re: Proposal: String key space for advisory locks
От | Josh Berkus |
---|---|
Тема | Re: Proposal: String key space for advisory locks |
Дата | |
Msg-id | 4AE72328.4060003@agliodbs.com обсуждение исходный текст |
Ответ на | Re: Proposal: String key space for advisory locks (Merlin Moncure <mmoncure@gmail.com>) |
Ответы |
Re: Proposal: String key space for advisory locks
|
Список | pgsql-hackers |
Merlin, > Why even bother with a hash function when you can just have multiple > table pull from a shared sequence? AFAICT, this solves the OP's > problem with no downsides (I used the approach with excellent results > in a ported cobol app which had pessimistic locking requirement). Well, if you have enough tables, the sequence itself becomes a bottleneck (yes, I've had this happen in an app where all tables shared one sequence). There's also the fact that such a solution is extremely hard to retrofit onto an existing application. It also offends my sense of good database design, but that's another issue entirely. More importantly, I think the issues raised here cause developers not to use advisory locks and instead use solutions more subject to race conditions, like a locking table. Advisory locks could be a really cool feature for developers if it was just a bit more usable. But, as others have pointed out, increasing the size of the lock namespace would cause huge issues elsewhere. --Josh Berkus
В списке pgsql-hackers по дате отправления: