Use WITH-TRANSACTION only with modify commands
Add function ASSERT-DB-WRITE-ACCESS to check or gain the write lock
Move VACUUM-MAYBE inside the unwind-protected form