dbcli / dbcli/pgcli

Cancelling query send does not cancel query

Abierto
#1,607 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
13.4k
Forks
612
Merge medio
6 d 14 h
PR fusionados (30 d)
10

Descripción

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
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
postgresql, python
Área
cli, databases
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.