Friday, March 17, 2017

PostgreSQL: exclusive lock on a table

Source: Exploring Query Locks in Postgres
crmmbqt=# begin; lock table radius_db.radacct in access exclusive mode;
BEGIN
Time: 0.516 ms
LOCK TABLE
Time: 1001.108 ms
Then
crmmbqt=# rollback;
ROLLBACK
Time: 0.714 ms