apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.87k stars 6.73k forks source link

PostgreSQL Proxy supports CancelRequest #12720

Open TeslaCN opened 3 years ago

TeslaCN commented 3 years ago

Feature Request

Describe the feature you would like.

  1. Proxy returns BackendKeyData to client in startup phase.
  2. Proxy can correctly reply CancelRequest.
soulasuna commented 2 years ago

I will try this issues.

TeslaCN commented 2 years ago

@soulasuna Welcome.

select pg_sleep(3);

In psql, we can cancel request by Ctrl-C. I wonder if we can do this in proxy.

bmsql=# select pg_sleep(3);
^CCancel request sent
ERROR:  canceling statement due to user request
soulasuna commented 2 years ago

I try to make Proxy supports CancelRequest operational. It is possible to supported at the protocol level, but when the next request is processed, the data returned by the canceled request will be read. So it cannot be controlled simply by adding a version number to the connection, because PostgreSQL an operation will be returned in multiple packets.

github-actions[bot] commented 2 years ago

Hello , this issue has not received a reply for several days. This issue is supposed to be closed.

github-actions[bot] commented 6 months ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.