Skip to content

Add view containing autovacuum information

Andreas Brandl requested to merge ab/autovacuum-status into master

The view contains information about running autovacuum processes, performing VACUUM operations in background. This is on a per-table basis and only contains the table and start time for the process.

The view is based on a function which returns autovacuum information from pg_stat_activity. It is structurally equivalent with pg_stat_activity, but limits information to autovacuum processes.

This is for security reasons: The regular gitlab user might not have access to pg_stat_activity. We can have a superuser define this function (as it's defined with SECURITY DEFINER), which allows the regular user to read from it.

Per default, we do expect the regular gitlab user to have read permissions on pg_stat_activity. This is only a workaround for GitLab.com, where this is not the case.

See #357248 (closed)

Changelog: other

Edited by Andreas Brandl

Merge request reports

Loading