powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
768 stars 57 forks source link

hypopg query problem #134

Closed seqizz closed 4 years ago

seqizz commented 4 years ago

Hi there,

Not sure if I should open this here or powa-web, but looks like hypopg integration has some issues on the predicates tab of it:

Could not create hypothetical index: function hypopg_create_index(unknown) does not exist

On the database itself, I can see the error in the postgresql logs:

2020-06-17 08:59:09 UTC [21007-1] powa@ipaddr ERROR:  function hypopg_create_index(unknown) does not exist at character 24
2020-06-17 08:59:09 UTC [21007-2] powa@ipaddr HINT:  No function matches the given name and argument types. You might need to add exp
licit type casts.
2020-06-17 08:59:09 UTC [21007-3] powa@ipaddr STATEMENT:  SELECT indexname
        FROM hypopg_create_index('CREATE INDEX ON "public"."my_table"(param_id,type)')

Weird thing is, when I give the same query manually, it returns a value.

Environment:

Thank you for this tool!

rjuju commented 4 years ago

Hello,

Either repository is ok!

That's indeed strange. Was the query manually run on the same server and the same database, with the same user?

seqizz commented 4 years ago

with the same user?

This is the part I facepalm.. Switching to powa role shows that user does not have the rights to execute the function.

Sorry for the noise and thanks for the tip!