psql not responding to SIGINT upon db reconnection
Tristan Partin <tristan@neon.tech>
From: "Tristan Partin" <tristan@neon.tech>
To: <pgsql-hackers@postgresql.org>
Date: 2023-07-24T16:25:47Z
Lists: pgsql-hackers
Attachments
- v1-0001-Allow-SIGINT-to-cancel-psql-database-reconnection.patch (text/x-patch) patch v1-0001
Neon provides a quick start mechanism for psql using the following workflow: $ psql -h pg.neon.tech NOTICE: Welcome to Neon! Authenticate by visiting: https://console.neon.tech/psql_session/xxx Upon navigating to the link, the user selects their database to work with. The psql process is then connected to a Postgres database at Neon. psql provides a way to reconnect to the database from within itself: \c. If, after connecting to a database such as the process previously mentioned, the user starts a reconnection to the database from within psql, the process will refuse to interrupt the reconnection attempt after sending SIGINT to it. tristan=> \c NOTICE: Welcome to Neon! Authenticate by visiting: https://console.neon.tech/psql_session/yyy ^C ^C^C ^C^C I am not really sure if this was a problem on Windows machines, but the attached patch should support it if it does. If this was never a problem on Windows, it might be best to check for any regressions. This was originally discussed in the a GitHub issue[0] at Neon. [0]: https://github.com/neondatabase/neon/issues/1449 -- Tristan Partin Neon (https://neon.tech)
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix old, misleading comment for PGRES_POLLING_ACTIVE.
- e57fe3824ee7 17.0 landed
-
Remove reachable call to pg_unreachable().
- 12b964d7815b 17.0 landed
-
Allow SIGINT to cancel psql database reconnections.
- cafe1056558f 17.0 landed
-
Expose PQsocketPoll via libpq
- f5e4dedfa81f 17.0 landed
-
Fix query cancellation handling in psql
- 5d43c3c54d77 13.0 cited