Skip to content

Fix function and view for autovacuum activity

Patrick Bair requested to merge pb-fix-autovacuum-function-and-view into master

What does this MR do and why?

Fix a view that reads from a set-returning function in !85103 (merged). This is breaking on PG13, which seems to be because it has an additional column in the pg_stat_activity, and the explicit column list in db/structure.sql is not compatible with the values actually returned from the function.

As a result we're getting an off-by-one on the column read, which is manifesting in ERROR: function regexp_matches(xid, text) (because the column before query in pg_stat_activity is backend_xmin, which is an xid).

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Patrick Bair

Merge request reports