db_compat: run DELETE in a table lock