Problem
When querying pg_stat_statements to debug some slow query generated by a user the results obtained will also contain our maintenance queries (generated by the schema cache and in-db config, at startup and reloading), which make it harder to pinpoint the particular query.
One workaround for this is filtering by the patterns of the queries. Like %with role_setting%, with %base_types%, etc; but doing this requires knowing PostgREST implementation details.
Notes
Problem
When querying
pg_stat_statementsto debug some slow query generated by a user the results obtained will also contain our maintenance queries (generated by the schema cache and in-db config, at startup and reloading), which make it harder to pinpoint the particular query.One workaround for this is filtering by the patterns of the queries. Like
%with role_setting%,with %base_types%, etc; but doing this requires knowing PostgREST implementation details.Notes