Report this

What is the reason for this report?

How are people monitoring managed Postgres query latency?

Posted on April 6, 2021

I am using Postgres in production but have run into challenges around monitoring.

I’d like to be able to see when queries are slow, especially as our data grows and our access patterns grow. Right now, Digital Ocean provides a “Query Statistics” tool which provides no information about the time range, nor an ability to set one. As a result, it is not usable to see how things are changing. The statistics are (evidently) across all time. If I address a bottleneck (by adding an index for example) I cannot go to the Query Statistics tool to see the corresponding drop in latency.

This is solved by other tools, but the “managed Postgres” offering from DO is too restrictive–you can’t access the host, and you can’t create a user with the GRANTS required for Datadog to do its job. So you’re stuck?

I am curious how others are solving this? Is it unusual to use the managed DB offering for real-world production use?



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, @andrew20, the configuration would depend on your DB architecture. If you have a cluster with multiple Write/Read nodes, you’ll need to tweak the configuration further.

In the nutshell, I’d recommend installing Grafana and link your PostgreSQL server/cluster to it.

Here’s a good resource: https://grafana.com/blog/2019/06/03/how-postgresql-and-grafana-can-improve-monitoring-together/

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.