- Notifications
You must be signed in to change notification settings - Fork38
Description
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 offpg_wait_sampling.profile_pid
(seehttps://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 offprofile_pid
, it was set back toon
later on. They also mentioned that they ran thepg_wait_sampling_reset_profile()
function multiple times to keep the POWA web interface responsive.
We could reproduce the problem thatprofile_pid
is reset toon
(the default) directly after callingpg_wait_sampling_reset_profile()
, but only once - After reloading the PostgreSQL configuration, the GUC was back tooff
but would then agan be set toon
whenpg_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.