Wrap all your operations in a single transaction and let the database do the work for you. More like:
$db->{AutoCommit}=0; $db->begin_work(); $db->do(operation 1); $db->do(operation 2); $db->do(operation 3); $db->commit();
Once you start a transaction, the database should prevent you from updating the same rows until you complete the current one.
...roboticusIn reply to Re: DBI and PostgreSQL advisory locks
by roboticus
in thread DBI and PostgreSQL advisory locks
by techcode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |