The first thing we want to do before upgrading is to examine any running transactions on the server. Anything that has been running for longer than one minute at the time we want to perform the upgrade is suspicious, and should be examined. It could be a batch job that may not complete for several hours, or a rogue connection that has languished after completing a desktop user's ad hoc query.
PostgreSQL can't tell the difference, and either of these connections will prevent PgBouncer from pausing the connections. PgBouncer must allow an executing transaction to complete before the PAUSE command will complete. Since we need this command to switch to the new cluster, we must remove these potential blockers before beginning.