Cancelling query send does not cancel query
- Ngôn ngữ chính
- Python
- Star
- 13.4k
- Fork
- 612
- Merge trung bình
- 6 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 10
Mô tả
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
```
Hướng dẫn đóng góp
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- postgresql, python
- Lĩnh vực
- cli, databases
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 52/100