Skip to content

Limit exporting pg_stat_statements to current PG user

Andreas Brandl requested to merge ab/pgss-only-for-user into master
Limit to current PG user

When exporting query statistics from pg_stat_statements,
we're only interested in those for the current PG user.
This is the user that also runs database migrations, for example.

If we exported all and didn't have enough privileges, we'd
start to see query strings with "<insufficient privileges>" instead.

Changelog: other

Additional context in gitlab-org/database-team/gitlab-com-database-testing!95 (comment 920729261)

Edited by Andreas Brandl

Merge request reports

Loading