金仓集群 KingbaseES V008R006C005B0023 on aarch64
UOS enterprise V20
2 问题描述
执行./sys_dump -U system -d test -f /tmp/test$(date +%F).sql 后报错:
2023-06-14 15:02:45 CST testtest17457 0ERROR: deadlock detected at character 1022023-06-14 15:02:45 CST testtest17457 0DETAIL: Process 17457 waits for AccessShareLock on relation 17141 of database 16462;
blocked by process 17248.
Process 17248 waits for AccessExclusiveLock on relation 17175 of database 16462; blocked by process 17457.
Process 17457: select * from "chat_sessions" where "engineer_code"=$1 and "status"=$2 and exists (select * from "chat_messages" where "chat_sessions"."id"="chat_messages"."session_id") order by "created_at" asc
3 处理方法
#inserts不会锁表,没有触发死锁。 不加inserts默认用copy命令#--inserts是inserts风格的sql记录数据。 金仓还是推荐备份为dmp格式。
./sys_dump -U system -d test -f /tmp/test$(date +%F).sql -v --inserts