Skip to content

Ctrl+C in pg:psql exiting #1254

Open
Open
@afn

Description

@afn

I believe this is the same issue originally reported in heroku/heroku-pg#116. I'm seeing it with the current version of heroku-cli:

[afn]$ heroku update
Updating completions... ⡿ [1/4] Resolving packages...
Updating completions... ⣻ [1/4] Resolving packages...
[afn]$ heroku --version
heroku/7.25.0 linux-x64 node-v11.14.0

Current behavior: hitting Ctrl+C inside pg:psql interrupts the current query but does not cause psql to exit

Actual behavior: psql exits immediately on Ctrl+C. It also ends up printing some output after control has returned to the shell.

Example:

[afn]$ heroku pg:psql -r prod
--> Connecting to postgresql-xxx-xxx
psql (11.2, server 9.6.12)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

xxx::DATABASE=> select pg_sleep(5);
^C !    Command cancelled.
[afn]$ Cancel request sent
ERROR:  canceling statement due to user request
amitree::DATABASE=> 
\q
[afn]$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions