What's the difference between functions: pg_cancel_backend(pid int) and pg_terminate_backend(pid int)? For me they work pretty the same.

有帮助吗?

解决方案

pg_cancel_backend() cancels the running query while pg_terminate_backend() terminates the entire process and thus the database connection.

When a program creates a database connection and sends queries, you can cancel one query without destroying the connection and stopping the other queries. If you destroy the entire connection, everything will be stopped.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top