Glossary: PostgreSQL Beyond the Basics
pg_cancel_backend(), pg_terminate_backend()
Also written: pg_cancel_backend, pg_terminate_backend
Functions that stop a blocker. The first cancels its current statement, and the second closes its whole connection, which is needed for an idle transaction.