How to view postgresql function 'explain' with Neon?
I would like to view the execution plan for a function in my postgres db running on Neon. From my understanding the way to do this is to use 'auto_explain'? However when I try to run
LOAD 'auto_explain'; (https://neon.tech/docs/postgres/auto-explain) I get an error saying that access to auto_explain library is not allowed. Now I think that has to do with my user privileges but my user is part of the neon_superuser group, but when I check the privileges for the neon_superuser that user does not have super user access either and from understanding of the docs the user needs access to the super user role to access this library?
I am on the free tier, not sure if that is part of the problem?
Thank you.Neon
auto_explain — log execution plans of slow queries - PostgreSQL Docs
id F.4. auto_explain — log execution plans of slow queries F.4.1. Configuration Parameters F.4.2. Example F.4.3. Author The auto_explain module provides a means for logging execution plans of slow st...
5 Replies
foreign-sapphire•2y ago
yep, that's currently a limitation that you cannot load arbitrary extensions even if they are usuallly bundled with postgres. https://neon.tech/docs/extensions/pg-extensions
Neon
Supported Postgres extensions - Neon Docs
Neon supports the Postgres extensions shown in the following table. The supported version of the extension sometimes differs by Postgres version. Extension PG14 PG15 PG16 Notes address_standardizer 3....
foreign-sapphire•2y ago
you may raise a support ticket on that
and we don't currently provide access to Postgres logs, and therefore you cannot get the information even if the extension is enabled. anyways, i would suggest filing a support ticket for further assistance.
fair-roseOP•2y ago
Oh man, that's a bummer, thanks for the reply though.
quickest-silver•2y ago
You can still manually run EXPLAIN for your individual query, and the Neon SQL editor provides a visual explain. Does your use case require automated explain logging?
fair-roseOP•2y ago
Hi @Daniel , I would like to run the EXPLAIN against a function, from my searching it seems I can only see the query plan for the sql inside a function with auto_explain.