powa-team/powa

Unable to sample extensions

webevader opened this issue · 4 comments

Hi,

I am not able to sample any extension other than pg_stat_statements. I am using remote setup. I have installed pg_qualstats, pg_stat_kcache,pg_wait_sampling,hypopg,pg_track_settings on the database which i am monitoring. I have attached the screenshot. They all are showing as installed but i am getting a cross for sampled.

image

This is the error i am getting while activation extensions.

powa=# SELECT powa_activate_extension(11, 'pg_wait_sampling');
ERROR: unrecognized configuration parameter "powa.debug"
CONTEXT: PL/pgSQL function powa_log(text) line 3 at IF
SQL statement "SELECT powa_log('registering pg_wait_sampling')"
PL/pgSQL function powa_wait_sampling_register(integer) line 22 at PERFORM
PL/pgSQL function powa_activate_extension(integer,text) line 67 at RETURN

Also when i specify extension clause in powa_register_server i get the below error.

ERROR: unrecognized configuration parameter "powa.debug"
CONTEXT: PL/pgSQL function powa_log(text) line 3 at IF
SQL statement "SELECT powa_log('registering pg_stat_kcache')"
PL/pgSQL function powa_kcache_register(integer) line 22 at PERFORM
PL/pgSQL function powa_activate_extension(integer,text) line 63 at RETURN
SQL statement "SELECT powa_activate_extension(v_srvid, v_extname)"
PL/pgSQL function powa_register_server(text,integer,text,text,text,text,integer,integer,interval,boolean,text[]) line 49 at SQL statement

Below are some additional details.
Setup Type : Remote
DB Repository version - 12.1
Monitored Database version - 12.1
powa web version - 4.0.0
powa-collector - 1.0.0

rjuju commented

This is because you don't have powa extension loaded on your repository server. You can do

LOAD 'powa'

before calling the function, or simply SET powa.debug = off, which should solve your problem.

Thank you Rjuju. Most of the extensions work now after loading powa extension on repository server.

image

However i still see powa and hypopg not being sampled. I am getting a false while running the below commands.

powa=# SELECT powa_activate_extension(11,'powa');
powa_activate_extension

f
(1 row)

powa=# SELECT powa_activate_extension(11, 'hypopg');
powa_activate_extension

f
(1 row)

I am pretty new to Postgres so I really appreciate your help in resolving these issues.

rjuju commented

This is actually intended. It might not be obvious if you're not familiar with the various extensions, but hypopg is an extension to create hypothetical indexes, not a stat extension, so it cannot be sampled. powa is the core extension that gather statistics, thus it also cannot be sampled. So as far as I can see everything is setup as it should be.

rjuju commented

FTR the need for LOAD 'powa' or any other workaround will be removed in the next version of powa.