dbcli / dbcli/pgcli

Cancelling query send does not cancel query

Offen
#1,607 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
13.4k
Forks
612
Ø Merge
6 T. 14 Std.
Gemergte PRs (30 T.)
10

Beschreibung

I'd expect ctrl-c or ctrl-d that cancels a query in the foreground, to also cancel that query on the backend (the postgres server).

for example:

```sql
postgres> SELECT some_long_running_query();
^C^Ccancelled query
postgres> select 1;
sending query failed: another command is already in progress
Time: 0.004s
postgres>
A transaction is ongoing. Choose `c` to COMMIT, `r` to ROLLBACK, `a` to abort exit, `force` to exit anyway. [a]: a
postgres> select 1;
A transaction is ongoing. Choose `c` to COMMIT, `r` to ROLLBACK, `a` to abort exit, `force` to exit anyway. [a]: r
sending query failed: another command is already in progress
another command is already in progress
another command is already in progress
another command is already in progress
Time: 0.004s
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduce the Ctrl-C or Ctrl-D sequence from the issue against a PostgreSQL server, then trace pgcli's foreground query cancellation and subsequent command handling. Done means cancelling the foreground query also cancels it on the backend, so a later `select 1;` does not fail with another command already in progress.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
postgresql, python
Bereich
cli, databases
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.