• Michael Paquier's avatar
    Use catalog query to discover tables to process in vacuumdb · e0c2933a
    Michael Paquier authored
    vacuumdb would use a catalog query only when the command caller does not
    define a list of tables.  Switching to a catalog table represents two
    advantages:
    - Relation existence check can happen before running any VACUUM or
    ANALYZE query.  Before this change, if multiple relations are defined
    using --table, the utility would fail only after processing the
    firstly-defined ones, which may be a long some depending on the size of
    the relation.  This adds checks for the relation names, and does
    nothing, at least yet, for the attribute names.
    - More filtering options can become available for the utility user.
    These options, which may be introduced later on, are based on the
    relation size or the relation age, and need to be made available even if
    the user does not list any specific table with --table.
    
    Author: Nathan Bossart
    Reviewed-by: Michael Paquier, Masahiko Sawada
    Discussion: https://postgr.es/m/FFE5373C-E26A-495B-B5C8-911EC4A41C5E@amazon.com
    e0c2933a
common.h 1.75 KB