Report this

What is the reason for this report?

Postgres - Database extension pg_stat_statement is activ but table doesn't exists

Posted on June 26, 2025

We operate a Postgres database on Digital Ocean. The database was imported externally.

Now we need the information of the table for an analysis: pg_stat_statement.

But this table does not exist. The extension is active and installed.

It cannot be recreated either. (Message Exension already exists)

My searches have not been successful so far. Furthermore, I sometimes don’t have enough rights to set anything. Does anyone have any ideas or suggestions as to how I can make progress here?

Postgres Version: 17



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey Lukas,

If the pg_stat_statements extension is installed but the view isn’t available, it’s usually one of two things: either you’re connected to the wrong database (it’s installed per database), or your user lacks permission to access it.

Make sure you’re connected to the same DB where the extension was created, then run:

SELECT * FROM pg_stat_statements LIMIT 10;

Also check:

SHOW shared_preload_libraries;

It should include pg_stat_statements.

If it is still not working, it might be worth reachint out to the DigitalOcean support team as well:

https://do.co/support

Let me know how it goes!

- Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.