有没有办法在没有独占锁的情况下删除 postgres 10.6 中的唯一约束?

Is there a way to drop a unique constraint in postgres 10.6 without an exclusive lock?

有没有办法在没有独占锁的情况下删除 postgres 10.6 中的唯一约束?我在这里提到的 table 使用频率很高,因此我担心独占锁。是否有关于 postgres 执行 drop 所需时间的统计数据?基本上那个时间将占我系统的停机时间。

应该很快。唯一的问题可能是 运行 长的交易,这可能会阻止您和其他必须在您后面排队的人。

找一个 window 没有长期 运行 交易,你会没事的。