By Lukas Ulrich
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!
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:
Let me know how it goes!
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.