他的回复:
从现象看,是并发建表导致的。复现过程:session Abegin;create table t(a int);session B:set lockwait_timeout='1s';set max_query_retry_times=0;begin;create table t(a int);此时session B报错如下:ERROR: Lock wait timeout: thread 139780858820352 on node coordinator1 waiting for ShareLock on transaction 1010092 after 2000.083 msDETAIL: blocked by hold lock thread 139781231081216, statement , hold lockmode ExclusiveLock.你的现象中持锁线程号为0,说明此时事务正在提交,锁冲突语句显示两阶段事务。建议从业务排查是否存在并发建同名表的情况