When DROP DATABASE is run, it should check for outstanding prepared transactions, and fail if there are some.
If there are prepared transactions, the DROP will succeed on some nodes, and fail on others, causing a database to stay around that cannot be dropped.
Because there may be concurrent activity, we may want to first attempt to lock the database when dropping.
I tried to reproduce the issue. However on prepared transactions it fails pointing out that that database has prepared transactions. Any more info on how to reproduce if the issue still valid?