[Gllug] A programming question. long.

Bruce Richardson brichardson at lineone.net
Fri Jul 6 10:10:25 UTC 2001


On Thu, Jul 05, 2001 at 10:37:56PM +0100, Bruce Richardson wrote:
> To *guarantee* that no two people see the same record, you need to run
> this inside a transaction and perform an exclusive table lock - this is
> the only way to ensure that concurrent accesses don't return the same
> record (by blocking concurrent access).

Contrary to what I said last night - late, tired - you can release the
exclusive lock as soon as you have updated the "locked" field on the
underlying table.  If you remember from my previous message, any row
with that field set will be ignored.




-- 
Bruce

What would Edward Woodward do?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 261 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20010706/abcb224d/attachment.pgp>


More information about the GLLUG mailing list