Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between terminating and cancelling a process

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

like image 625
Borys Avatar asked Sep 18 '13 08:09

Borys


People also ask

What is the difference between cancellation and termination?

"Cancellation" occurs when either party puts an end to the contract for breach by the other and its effect is the same as that of "termination" except that the cancelling party also retains any remedy for breach of the whole contract or any unperformed balance.

What is the difference between cancellation and invalidation of contract?

The other basic difference between invalidation and cancellation lies in their ground. The ground for invalidation is defect in its formation while the ground for cancellation is non-performance.

What is it called when you cancel a contract?

Contract rescission is the legal term used when a contract is terminated or cancelled. It may also be called “overturning” or “cancellation” of a contract. Contract rescission ends the contract. Often, this also cancels any of the legal responsibilities that were in the contract.


1 Answers

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.

like image 181
Frank Heikens Avatar answered Sep 20 '22 13:09

Frank Heikens