Вопрос

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