dbcli / dbcli/pgcli

Cancelling query send does not cancel query

オープン
#1,607 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
13.4k
フォーク
612
平均マージ
6日 14時間
マージ済み PR(30日)
10

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
postgresql, python
領域
cli, databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。