一个进程正在尝试在工作流中更改表(以设置默认列值)。由于 postgres 自动清理进程未释放锁(它可能持有 ShareUpdateExclusiveLock),因此该进程被阻止。
在 postgres 中可以看到以下日志 -
LOG: automatic vacuum to prevent wraparound of table "my_db.public.event_spl_1740300900": index scans: 0
pages: 0 removed, 16591962 remain, 0 skipped due to pins, 16300723 skipped frozen
tuples: 0 removed, 1244397113 remain, 0 are dead but not yet removable, oldest xmin: 1410720248
buffer usage: 2361602 hits, 6947399 misses, 291262 dirtied
avg read rate: 3.879 MB/s, avg write rate: 0.163 MB/s
system usage: CPU: user: 83.69 s, system: 135.74 s, elapsed: 13990.91 s
LOG: process 113323 acquired AccessExclusiveLock on relation 181282787 of database 180669275 after 5823314.224 ms
这里是否有足够的证据表明自动真空可能是罪魁祸首?如果没有,其他阻塞过程可能是什么?