Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/6331~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/6331
Choose a head ref
  • 2 commits
  • 10 files changed
  • 2 contributors

Commits on Dec 21, 2025

  1. pg_terminate_backend_msg and pg_cancel_backend_msg

    Sometimes it is useful to terminate some backend
    process with additional message from admin.
    
    This patch introduces two new functions:
     - pg_terminate_backend_msg(pid, timeout, msg)
     - pg_cancel_backend_msg(pid, msg)
    
    The functions are similar with pg_terminate_backend/pg_cancel_backend,
    but adds additional argument: the message, that will be passed into
    FATAL/ERROR packet when terminating/canceling backend.
    
    To do that, the patch introduces new module: BackendMsg - shared memory
    region that holds pairs of (message, pid) which are checked in ProcessInterrupts()
    
    Ex. of usage:
    postgres=# select pg_terminate_backend_msg(pg_backend_pid(), 0, 'Some message');
    FATAL:  terminating connection due to administrator command: Some message
    
    Author: Daniel Gustafsson <daniel@yesql.se>
    Author: Roman Khapov <r.khapov@ya.ru>
    Reviewed-by:
    Discussion:
    rkhapov authored and Commitfest Bot committed Dec 21, 2025
    Configuration menu
    Copy the full SHA
    2d3af53 View commit details
    Browse the repository at this point in the history
  2. [CF 6331] v2 - Message in pg_terminate_backend

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/6331
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/F6DCC9FF-002B-4CD5-9D36-5C8710142958@yandex-team.ru
    Author(s): Roman Khapov
    Commitfest Bot committed Dec 21, 2025
    Configuration menu
    Copy the full SHA
    f3b7e7b View commit details
    Browse the repository at this point in the history
Loading