Hi Bharath, v2 looks right. The new test fails without your change and passes with it. Attached v3 is only a rebase over head.
A superuser's parallel worker is still refused, other role cases did not change. The check also covers the REPACK decoding worker, which connects as the table owner. DROP DATABASE fails on its slot first, so that looks fine. I did not test the bgworker case. The check does not look at the backend type, and such a bgworker leaves roleId unset like autovacuum does, so I think it works too. Thanks, Shihao
v3-0001-Fix-DROP-DATABASE-FORCE-to-terminate-parallel-wor.patch
Description: Binary data
