On Tue, Oct 11, 2022 at 08:31:53PM +0800, jiye wrote: > But, as follow, if txn1 not commit (just like long term readonly txn), it > will block txn2's ddl job, why alt add/drop column can not concurrently with > read only access? > txn1: long term txn not commit access t1. > txn2 waiting txn1 to commit or abort. > txn3 wait txn2...
1. Please don't share code as screenshots. 2. If I understand your text above correctly, then the solution is trivial: https://www.depesz.com/2019/09/26/how-to-run-short-alter-table-without-long-locking-concurrent-queries/ depesz