Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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/5117~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/5117
Choose a head ref
  • 2 commits
  • 25 files changed
  • 2 contributors

Commits on Apr 4, 2025

  1. Add REPACK command.

    The existing CLUSTER command as well as VACUUM with the FULL option both
    reclaim unused space by rewriting table. Now that we want to enhance this
    functionality (in particular, by adding a new option CONCURRENTLY), we should
    enhance both commands because they are both implemented by the same function
    (cluster.c:cluster_rel). However, adding the same option to two different
    commands is not very user-friendly. Therefore it was decided to create a new
    command and to declare both CLUSTER command and the FULL option of VACUUM
    deprecated. Future enhancements to this rewriting code will only affect the
    new command.
    
    Like CLUSTER, the REPACK command reorders the table according to the specified
    index. Unlike CLUSTER, REPACK does not require the index: if only table is
    specified, the command acts as VACUUM FULL. As we don't want to remove CLUSTER
    and VACUUM FULL yet, there are three callers of the cluster_rel() function
    now: REPACK, CLUSTER and VACUUM FULL. When we need to distinguish who is
    calling this function (mostly for logging, but also for progress reporting),
    we can no longer use the OID of the clustering index: both REPACK and VACUUM
    FULL can pass InvalidOid. Therefore, this patch introduces a new enumeration
    type ClusterCommand, and adds an argument of this type to the cluster_rel()
    function and to all the functions that need to distinguish the caller.
    
    Like CLUSTER and VACUUM FULL, the REPACK COMMAND without arguments processes
    all the tables on which the current user has the MAINTAIN privilege.
    
    A new view pg_stat_progress_repack view is added to monitor the progress of
    REPACK. Currently it displays the same information as pg_stat_progress_cluster
    (except that column names might differ), but it'll also display the status of
    the REPACK CONCURRENTLY command in the future, so the view definitions will
    eventually diverge.
    
    Regarding user documentation, the patch moves the information on clustering
    from cluster.sgml to the new file repack.sgml. cluster.sgml now contains a
    link that points to the related section of repack.sgml. A note on deprecation
    and a link to repack.sgml are added to both cluster.sgml and vacuum.sgml.
    Antonin Houska authored and Commitfest Bot committed Apr 4, 2025
    Configuration menu
    Copy the full SHA
    86989a4 View commit details
    Browse the repository at this point in the history
  2. [CF 5117] VACUUM FULL / CLUSTER CONCURRENTLY

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