Skip to content

profile_pid (and profile_queries) GUCs are reset to defaults when a parallel query is run #85

Closed
@mbanck-cd

Description

@mbanck-cd

One of our customers complained that POWA's web interface was getting very slow to respond and they tracked it down to slow queries being done on the POWA database, which in turn were correlated with very large pg_wait_sampling data. POWA recommends turning off pg_wait_sampling.profile_pid (see https://powa.readthedocs.io/en/latest/components/stats_extensions/pg_wait_sampling.html#configuration), which they did.

What they noticed though, was that even after turning off profile_pid, it was set back to on later on. They also mentioned that they ran the pg_wait_sampling_reset_profile() function multiple times to keep the POWA web interface responsive.

We could reproduce the problem that profile_pid is reset to on (the default) directly after calling pg_wait_sampling_reset_profile(), but only once - After reloading the PostgreSQL configuration, the GUC was back to off but would then agan be set to on when pg_wait_sampling_reset_profile() is called. However, we have not managed to find a way to reliably reproduce this from an empty instance or database.

We had a look at the code but so far did not see an obvious issue with how the configuration parameters are set, so are just opening this issue in case this rings a bell somewhere, or somebody knows what is going on and can fix it. We will continue to diagnose the problem next week.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions