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

Commits on Nov 3, 2025

  1. Report output plugin statistics in pg_stat_replication_slots

    As of now pg_stat_replication_slots reports statistics about the reorder
    buffer, but it does not report output plugin statistics like the amount of data
    filtered by the output plugin, amount of data sent downstream or the
    number of transactions sent downstream. This statistics is useful when
    investigating issues related to a slow downstream.
    
    This commit adds following fields to pg_stat_replication_slots
    - plugin_filtered_bytes is the amount of changes filtered out by the
      output plugin
    - plugin_sent_txns is the amount of transactions sent downstream by the
      output plugin
    - plugin_sent_bytes is the amount of data sent downstream by the output
      plugin.
    
    The prefix "plugin_" indicates that these counters are related to and
    maintained by the output plugin. An output plugin may choose not to
    initialize LogicalDecodingContext::stats, which holds these counters, in
    which case the above columns will be reported as NULL.
    
    When the stats are disabled after being enabled for a while, the plugin
    stats are reset to 0, rather than carrying over the stale stats from the
    time when the plugin was supporting the stats. This does not matter if
    the plugin continues not to support statistics forever. But in case it
    was supporting the stats once, discontinued doing so at some point in
    time and then starts supporting the stats later, accumulating the new
    stats based on the earlier accumulated stats could be misleading.
    
    Filtered bytes are reported next to total_bytes to keep these two
    closely related fields together.
    
    Additionally report name of the output plugin in the view for an easy
    reference.
    
    total_bytes and total_txns are the only fields remaining unqualified -
    they do not convey what those bytes and txns are. Hence rename them
    total_wal_bytes and total_wal_txns respectively to indicate that those
    counts come from WAL stream.
    
    Author: Ashutosh Bapat <[email protected]>
    Reviewed-by: Shveta Malik <[email protected]>
    Reviewed-by: Bertrand Drouvot <[email protected]>
    Reviewed-by: Amit Kapila <[email protected]>
    Reviewed-by: Ashutosh Sharma <[email protected]>
    Discussion: https://www.postgresql.org/message-id/CAExHW5s6KntzUyUoMbKR5dgwRmdV2Ay_2+AnTgYGAzo=Qv61wA@mail.gmail.com
    ashutosh-bapat authored and Commitfest Bot committed Nov 3, 2025
    Configuration menu
    Copy the full SHA
    2e5fb44 View commit details
    Browse the repository at this point in the history
  2. [CF 5877] Report bytes and transactions actually sent downtream

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5877
    
    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/CAExHW5u_aG+94p8bTXRZmM0VEaDxYurprTddvNjpVx2gVkujqg@mail.gmail.com
    Author(s): Ashutosh Bapat
    Commitfest Bot committed Nov 3, 2025
    Configuration menu
    Copy the full SHA
    5dd7f4a View commit details
    Browse the repository at this point in the history
Loading