You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/07 06:36:02 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue, #20854: Support SHOW PROCESSLIST/KILL-like feature for PostgreSQL/openGauss databases

strongduanmu opened a new issue, #20854:
URL: https://github.com/apache/shardingsphere/issues/20854

   ## Feature Request
   
   ### Is your feature request related to a problem?
   
   https://github.com/apache/shardingsphere/issues/20299 
   
   ### Describe the feature you would like.
   
   In version 5.2.0, ShardingSphere supports MySQL `SHOW PROCESSLIST` and `KILL` statements, which makes it more convenient for users to manage SQL.
   
   The following figure shows the execution process of the current `SHOW PROCESSLIST` statement. It can be seen that it is a general process that can support different types of databases.
   
   ![show_process_list](https://user-images.githubusercontent.com/10829171/188804585-8cdd3d27-75e8-4639-98a2-b49e64be7a71.png)
   
   So we need to investigate whether PostgreSQL and openGauss databases have statements similar to MySQL SHOW PROCESSLIST/KILL, and then adapt these statements for PostgreSQL and openGauss databases.
   
   - [ ] investigate whether the PostgreSQL database has a statement similar to MySQL SHOW PROCESSLIST/KILL and support it——https://stackoverflow.com/questions/35319597/how-to-stop-kill-a-query-in-postgresql
   - [ ] investigate whether the openGauss database has a statement similar to MySQL SHOW PROCESSLIST/KILL and support it
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] ICannerxy commented on issue #20854: Support SHOW PROCESSLIST/KILL-like feature for PostgreSQL/openGauss databases

Posted by GitBox <gi...@apache.org>.
ICannerxy commented on issue #20854:
URL: https://github.com/apache/shardingsphere/issues/20854#issuecomment-1238976230

   I want to do the first requirement .(Adaptation PostgreSQL database)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu commented on issue #20854: Support SHOW PROCESSLIST/KILL-like feature for PostgreSQL/openGauss databases

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #20854:
URL: https://github.com/apache/shardingsphere/issues/20854#issuecomment-1261864673

   @ICannerxy Can you try with sharding feature, the result looks like PostgreSQL original result.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] ICannerxy commented on issue #20854: Support SHOW PROCESSLIST/KILL-like feature for PostgreSQL/openGauss databases

Posted by GitBox <gi...@apache.org>.
ICannerxy commented on issue #20854:
URL: https://github.com/apache/shardingsphere/issues/20854#issuecomment-1261861462

   1. create table t1(id integer, name text);
   2. insert into t1 values(1, 'a'); insert into t1 values(2, 'b');
   3. 
   <img width="862" alt="image" src="https://user-images.githubusercontent.com/40480377/192963299-bc1bf874-e950-45bd-8a5c-3843a9b0d660.png">
   > `51293` is pid
   
   ![image](https://user-images.githubusercontent.com/40480377/192964020-13d59a42-67ea-46ab-aef9-c36bb88ea033.png)
   
   ![image](https://user-images.githubusercontent.com/40480377/192963585-507cdae7-92ed-48fc-bfaf-2c5661045187.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu commented on issue #20854: Support SHOW PROCESSLIST/KILL-like feature for PostgreSQL/openGauss databases

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #20854:
URL: https://github.com/apache/shardingsphere/issues/20854#issuecomment-1238977054

   Welcome @ICannerxy, I will assign this issue to you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] ICannerxy commented on issue #20854: Support SHOW PROCESSLIST/KILL-like feature for PostgreSQL/openGauss databases

Posted by GitBox <gi...@apache.org>.
ICannerxy commented on issue #20854:
URL: https://github.com/apache/shardingsphere/issues/20854#issuecomment-1261844707

   Postgresql supports functions similar to `show processlist` and `kill <processID>`.
   Use `SELECT * FROM pg_stat_activity WHERE state = 'active';` to query running SQL, and use `SELECT pg_cancel_backend(<pid of the process>)` to kill the running SQL. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org