Thread

  1. Re: REPACK and naming

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2025-09-16T23:42:29Z

    Hi,
    
    On 2025-Sep-16, Bruce Momjian wrote:
    
    > I am starting to get worried about the confusing of adding a REPACK
    > command.  We already have a lot of confusion around vacuum and analyze:
    > 
    > *  autoanalyze does vacuum and analyze
    > *  VACUUM FULL is much different from VACUUM
    > 
    > It seems if we add REPACK as a command, it is somewhere between VACUUM
    > FULL and VACUUM in severity/impact.
    
    No, REPACK is exactly where VACUUM FULL is in terms of impact and
    severity; it's not between anything.  The confusion stems precisely from
    VACUUM being a thing that's a completely different one from VACUUM FULL,
    yet they have pretty much the same name.  What I'm doing is give one of
    those things a different name, to reduce confusion.  Note that there's
    no intention to add autorepack, because that would (IMO) make no sense.
    
    Another thing I'm doing with that patch is rename CLUSTER so that it is
    also REPACK.  This also makes sense, because VACUUM FULL _is_ the same
    as CLUSTER, except that it follows current physical order instead of
    following a specific index's order.
    
    
    Peter E suggested that since we have REINDEX to rewrite indexes, then
    the command to rewrite tables should be RETABLE.  I haven't been able to
    get myself to like that idea, and also I think that was a bit
    tongue-in-cheek, but if you like RETABLE better than REPACK, then maybe
    we can have a vote to decide which one of those names to use.  However,
    I don't think that change would make a tremendous difference, and also I
    don't think RETABLE is enough of an English name to become a command
    name.
    
    > Should we be rethinking the naming in this area?
    
    I haven't seen anything that needs renaming TBH, but if you have
    specific proposals, feel free to air them.
    
    -- 
    Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
    "Thou shalt not follow the NULL pointer, for chaos and madness await
    thee at its end." (2nd Commandment for C programmers)