sql - PostgreSQL Locking Questions -
i trying figure out how lock entire table writing in postgres doesn't seem working assuming doing wrong.
table name 'users' example.
lock table users in exclusive mode;
when check view pg_locks doesn't seem in there. i've tried other locking modes no avail.
other transactions capable of performing lock function , not block assumed would.
in psql tool (8.1) lock table.
any wonderful.
there no lock table in sql standard, instead uses set transaction specify concurrency levels on transactions. should able use lock in transactions one
begin work; lock table table_name in access exclusive mode; select * table_name id=10; update table_name set field1=test id=10; commit work;
i tested on db.
Comments
Post a Comment