powa-team / powa

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

function powa_take_snapshot() does not exist at character 8 #115

Closed kel00s closed 5 years ago

kel00s commented 5 years ago

Hi all,

After adding powa to shared_libraries I spotted below issue. Can you help me with finding root cause?

Regards,

2019-04-05 12:54:11.875 UTC @ 8101  LOG:  POWA connected to database powa
2019-04-05 12:54:11.876 UTC @ 8101  ERROR:  function powa_take_snapshot() does not exist at character 8
2019-04-05 12:54:11.876 UTC @ 8101  HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
2019-04-05 12:54:11.876 UTC @ 8101  QUERY:  SELECT powa_take_snapshot()
2019-04-05 12:54:11.877 UTC @ 1986  LOG:  worker process: powa (PID 8101) exited with exit code 1
rjuju commented 5 years ago

Did you install powa on the powa database?

What does this query returns, on the powa database:

SELECT pronamespace::regnamespace, oid::regprocedure FROM pg_proc WHERE proname = 'powa_take_snapshot';

kel00s commented 5 years ago

Sorry for long response:

 pronamespace |         oid
--------------+----------------------
 public       | powa_take_snapshot()
(1 row)
rjuju commented 5 years ago

Is it on the powa database?, on the local server?

kel00s commented 5 years ago

yes,

rjuju commented 5 years ago

I see. Did you modify the search_path setting, either globally or for the user and/or database?

kel00s commented 5 years ago

Here is the value,

    name     |     setting
-------------+-----------------
 search_path | "$user", public
(1 row)
rjuju commented 5 years ago

Is it the output from pg_settings ? What does \drds show?

kel00s commented 5 years ago

Yes, It was from pg_settings

powa=# \drds
                             List of settings
       Role        | Database |                 Settings
-------------------+----------+-------------------------------------------
 postgres_exporter |          | search_path=postgres_exporter, pg_catalog
(1 row)
rjuju commented 5 years ago

Is postgres_exporter your bootstrap superuser?

kel00s commented 5 years ago

Sorry for long response, I had to drop implementing powa project into our infra cause we need to have installed this as sidecar to primary and standby servers.

Please close.

Many thanks for help!

rjuju commented 5 years ago

I'm not sure that I get your last comment. Is your main issue with powa the fact that you can't use it to track activity on a standby server?

rjuju commented 5 years ago

I'm closing this issue. If you needed a tool working on a standby, please note that the v4 (released in beta today) is able to do that!