I have a open psql session using the psql cli on a Ubuntu machine.
The server is only accessible via a specific VPN. Sometimes, I have to switch VPN and I cannot activate both VPNs at the same time.
If I switch back to the original VPN, I can reuse my psql session. However, If I execute something while being on the wrong VPN, the client moves into a state where I cannot do anything. Cancelling the request fails, I also cannot exit the client. This does not change when I switch back to the correct VPN, the psql client remains in a broken state.
How can I exit or restore the psql client without closing my terminal and reopening it?