pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Check if installed extension is in use
2+ messages / 2 participants
[nested] [flat]

* Check if installed extension is in use
@ 2021-06-30 14:14 Christian Lehmann <info@chlehmann.ch>
  2021-06-30 14:27 ` Re: Check if installed extension is in use Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 1 reply; 2+ messages in thread

From: Christian Lehmann @ 2021-06-30 14:14 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hi List
I am currently building a new postgresql-13 (maybe 14, if release is
on time) cluster which will replace the currently running 9.6
instances. I don't know much about the data(bases) which are on these
clusters.

I saw that plpythonu is installed on all instances. As I understand,
the only version of plpython is version 3 and existing scripts may no
longer work with python3.

Now my question: Is it possible to see if a certain extension is in
active use? Do I have to switch on statement-logs to see it?
Unfortunately even (some) application-owners cannot answer if I ask
them if the python is used.

I hope my question is clear enough.
Chris





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Check if installed extension is in use
  2021-06-30 14:14 Check if installed extension is in use Christian Lehmann <info@chlehmann.ch>
@ 2021-06-30 14:27 ` Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2021-06-30 14:27 UTC (permalink / raw)
  To: Christian Lehmann <info@chlehmann.ch>; pgsql-admin@lists.postgresql.org

On Wed, 2021-06-30 at 16:14 +0200, Christian Lehmann wrote:
> Now my question: Is it possible to see if a certain extension is in
> active use?

BEGIN;
DROP EXTENSION plpython3u;
ROLLBACK;

If you can drop the extension, no objects depend on it.

For example, that will show if there are any PL/Python functions defined.

If you want to know if PL/Python functions are used, monitor
"pg_stat_user_functions" (after enabling "track_functions") and see if
the number of calls is growing.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-06-30 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 14:14 Check if installed extension is in use Christian Lehmann <info@chlehmann.ch>
2021-06-30 14:27 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox