Hi Sawada-san, Attached v5 drops the lock and adds a comment on why the read is safe. It also adds the !OidIsValid(leader->roleId) check and sets roleId to InvalidOid directly, so only a leader with no advertised role changes anything.
Thanks, Shihao
v5-0001-Fix-DROP-DATABASE-FORCE-to-terminate-parallel-wor.patch
Description: Binary data
