[Bizgres-general] Transactional Statement Queuing - Queue Design 1

Jim C. Nasby jnasby at pervasive.com
Thu May 4 17:31:37 UTC 2006


On Thu, May 04, 2006 at 02:29:16PM +1200, Mark Kirkwood wrote:
> While there are only two lock modes defined :'exclusive' and 'shared' 
> (see src/include/storage/lwlock.h), it is fairly straightforward to either:
> 
> - add another lock mode (say 'share-limited' or just 'limited') that
>    works like 'shared' but with a limit to the number of holders (or)
> - amend the 'shared' section of code to:
>     -> see if there is a limit associated with the particular lightweight
>        lock
>     -> set the mustwait flag if the number of shared holder is = the
>        limit.

Maybe I missed this somewhere, but how will you ensure some kind of
order on which backend gets to take the next lock when one becomes
available? Or is there alread code in the locking mechanisms that
provides for this?
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby at pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


More information about the Bizgres-general mailing list