Description
Hi, I'm one of the PgBouncer maintainers and this looks like a really cool project!
Since I recently solved some really confusing and hard to find bug in PgBouncer I wanted to check if this same bug was solved here too. But after taking a quick look at the code, it seems like it has the same bug that PgBouncer had. The pgbouncer change (with description of the issue) I'm talking about is this one: pgbouncer/pgbouncer#717
The regression test that PgBouncer has can be found here (I recently converted the tests to Python): https://github.com/pgbouncer/pgbouncer/blob/master/test/test_cancel.py#L85
PS. I have another cancellation related PR open on PgBouncer: pgbouncer/pgbouncer#666 with an accompanying conference talk: https://www.youtube.com/watch?v=M585FfbboNA
Load balancing across multiple pgcat instances would have this same issue that PgBouncer currently still has. It's less of an issue for you since your multicore strategy doesn't rely on multiple instances, but still if you have dedicated pgcat nodes with a TCP load balancer in front you will run into this issue.