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/5811~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/5811
Choose a head ref
  • 2 commits
  • 6 files changed
  • 2 contributors

Commits on Aug 10, 2025

  1. Add pg_get_multixact_stats() SQL function for monitoring multixact usage

    This patch adds pg_get_multixact_stats(), a SQL-callable function that returns
    multixact statistics to aid in monitoring wraparound risk and vacuum behavior.
    It reports:
    
    multixacts: the number of multixact IDs created since the oldest one still needed
    members: the number of multixact member entries that currently exist
    oldest_multixact: the oldest multixact ID still needed by any database
    
    The function modifies ReadMultiXactCounts() to expose the oldestMultiXactId and
    returns all three values in a composite record. This allows users to monitor
    multixact usage and identify potential wraparound issues, particularly useful
    when combined with pg_get_multixact_members() to investigate specific multixacts.
    
    Usage:
    SELECT * FROM pg_get_multixact_stats();
    
    Documentation is added to:
    - "Transaction ID and Snapshot Information Functions" section in func.sgml
    - "Multixacts and Wraparound" section in maintenance.sgml
      (routine-vacuuming.html#VACUUM-FOR-MULTIXACT-WRAPAROUND)
    
    Isolation tests are added to verify:
    - Initial state with zero multixacts
    - multixact creation with overlapping shared locks
    - Correct counting of multixacts and members
    - Proper tracking of oldest multixact ID
    
    Author: Naga Appani <[email protected]>
    Reviewed-by: Ashutosh Bapat <[email protected]>
    Reviewed-by: Michael Paquier <[email protected]>
    Discussion: https://www.postgresql.org/message-id/flat/CAM2BeoX%2BRasKfG6W8w4qYZZz4BnhyEQMA_y5cEDnKEY_z8o9Czg%40mail.gmail.com
    Naga Appani authored and Commitfest Bot committed Aug 10, 2025
    Configuration menu
    Copy the full SHA
    4117c12 View commit details
    Browse the repository at this point in the history
  2. [CF 5811] v3 - Expose internal MultiXact member count function for ef…

    …ficient monitoring
    
    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5811
    
    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/CA+QeY+D_npapLjsu0UZ-pgRGLwqx0GjAmRL_a+R9UOB7jgY=_Q@mail.gmail.com
    Author(s): Naga Appani
    Commitfest Bot committed Aug 10, 2025
    Configuration menu
    Copy the full SHA
    5b129c8 View commit details
    Browse the repository at this point in the history
Loading