Comment 3 for bug 1928633

Revision history for this message
Colin Watson (cjwatson) wrote :

The problem here is that unlocking the advisory lock fails if the current transaction is aborted. We could manage the transaction state more carefully to avoid this, but I think a better solution is probably to use `pg_try_advisory_xact_lock` to acquire a transaction-level advisory lock instead, as that way we won't need to unlock it explicitly.