【PostgreSQL】如何手动对某个数据库表进行锁定?

test=# begin;
BEGIN
test=# lock table simple in access  exclusive mode;
LOCK TABLE
test=#

这样的话,只有当前session进程可以对simple进行操作,其他session操作的时候,会进入Lock状态。

#######################################------########################
#######################################------########################

你可能感兴趣的:(PostgreSQL,数据库,postgresql)