final class VacuumChecks
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Checks the option values of VACUUM and the combinations the server refuses.

Rule: PG-VACUUM-OPTIONS-001. PARALLEL takes an integer from 0 to 1024 and must have a value. INDEX_CLEANUP without a value or with auto, compared without regard to case, leaves the choice to the server; any other value must be Boolean. The Boolean options are read by PG-UTILITY-OPTION-VALUE-001; PROCESS_MAIN and PROCESS_TOAST are on unless turned off. The server refuses: BUFFER_USAGE_LIMIT with FULL unless ANALYZE is on; FULL with PARALLEL above 0; a column list without ANALYZE; FULL with DISABLE_PAGE_SKIPPING; FULL with PROCESS_TOAST off; ONLY_DATABASE_STATS with tables, or with any of ANALYZE, FREEZE, FULL, SKIP_LOCKED, DISABLE_PAGE_SKIPPING and SKIP_DATABASE_STATS on. Termination: one pass over the options. Source: https://www.postgresql.org/docs/17/sql-vacuum.html. Status: Implemented.

Methods§

public function check(
    Derivation $derivation,
    list<UtilityOption> $options,
    bool $tables,
    bool $columns,
): void
public function workers(Derivation $derivation, UtilityOption $option): int

Answers the number of workers a PARALLEL option asks for, reporting a missing, non-integer or out-of-range value; 0 when there is no valid one.

Parameters

$derivationDerivation
$optionUtilityOption

Returns

int
Called from 1
Calls 8
public function combined(list<UtilityOption> $options): bool

Tells whether an option ONLY_DATABASE_STATS excludes is on.

Parameters

$optionslist<UtilityOption>

Returns

bool
Called from 1
Calls 3

Private surface 2§

Implementation details, listed for orientation only.

private const EXCLUSIVE = ['analyze', 'freeze', 'full', 'skip_locked', 'disable_page_skipping', 'skip_dat…
private const WORKERS = 1024

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Method calls 1