Presumably 2877 has it (?), but aborted (do you have an error message in the server log?), and the workers have somehow survived TerminateBackgroundWorker() (called by DestroyParallelContext()).
Query was stuck for 8 hours when we tried to terminate it. Makes me think, that master process was
still waiting for bgworkers to finish, as test run finished in 11ms for me. As I mentioned, we've got this case re-appear while I was preparing
the report (had to restart the DB second time). I think I might make it happen again, if necessary.
There is not so much in the logs: - a bunch of `FATAL: connection to client lost`, but from another (web) user (couple errors per hour) - `ERROR: canceling statement due to conflict with recovery`, happened right when our problematic query started, same user - errors related to shutdown/startup of the DB.