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

Commits on Apr 30, 2025

  1. Further adjust guidance for running vacuumdb after pg_upgrade.

    Since pg_upgrade does not transfer the cumulative statistics used
    for triggering autovacuum and autoanalyze, the server may take much
    longer than expected to process them post-upgrade.  Currently, the
    pg_upgrade documentation recommends analyzing only relations for
    which optimizer statistics were not carried over during upgrade.
    This commit appends another recommendation to also analyze all
    relations to update the relevant cumulative statistics, similar to
    the recommendation for pg_stat_reset().
    
    Reported-by: Christoph Berg <myon@debian.org>
    Reviewed-by: Christoph Berg <myon@debian.org>
    Discussion: https://postgr.es/m/aAfxfKC82B9NvJDj%40msg.df7cb.de
    nathan-bossart authored and Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    53ae26f View commit details
    Browse the repository at this point in the history
  2. vacuumdb: Don't skip empty relations in --missing-stats-only.

    Presently, --missing-stats-only skips relations with reltuples set
    to 0 because empty relations don't get optimizer statistics.
    However, before v14, a reltuples value of 0 was ambiguous: it could
    either mean the relation is empty, or it could mean that it hadn't
    yet been vacuumed or analyzed.  (Commit 3d351d9 taught Postgres
    14 and newer to use -1 for the latter case.)  This ambiguity can
    cause --missing-stats-only to inadvertently skip relations that
    need optimizer statistics.
    
    To fix, simply remove the check for reltuples != 0.  This will
    cause --missing-stats-only to analyze some empty tables, but that
    doesn't seem too terrible a trade-off.
    
    Reported-by: Christoph Berg <myon@debian.org>
    Reviewed-by: Christoph Berg <myon@debian.org>
    Discussion: https://postgr.es/m/aAjyvW5_fRGNr7yF%40msg.df7cb.de
    nathan-bossart authored and Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    193c31e View commit details
    Browse the repository at this point in the history
  3. [CF 5717] v2 - vacuumdb fixes for v18

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5717
    
    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/aAkKprD55h7_1F5v@nathan
    Author(s): Nathan Bossart
    Commitfest Bot committed Apr 30, 2025
    Configuration menu
    Copy the full SHA
    fc4fa03 View commit details
    Browse the repository at this point in the history
Loading