• Alvaro Herrera's avatar
    Rationalize vacuuming options and parameters · 0d831389
    Alvaro Herrera authored
    We were involving the parser too much in setting up initial vacuuming
    parameters.  This patch moves that responsibility elsewhere to simplify
    code, and also to make future additions easier.  To do this, create a
    new struct VacuumParams which is filled just prior to vacuum execution,
    instead of at parse time; for user-invoked vacuuming this is set up in a
    new function ExecVacuum, while autovacuum sets it up by itself.
    
    While at it, add a new member VACOPT_SKIPTOAST to enum VacuumOption,
    only set by autovacuum, which is used to disable vacuuming of the toast
    table instead of the old do_toast parameter; this relieves the argument
    list of vacuum() and some callees a bit.  This partially makes up for
    having added more arguments in an effort to avoid having autovacuum from
    constructing a VacuumStmt parse node.
    
    Author: Michael Paquier. Some tweaks by Álvaro
    Reviewed by: Robert Haas, Stephen Frost, Álvaro Herrera
    0d831389
vacuumlazy.c 56.1 KB