DatabaseMeter

DatabaseMeter for PostgreSQL

Monitor PostgreSQL directly without inventing provider data.

Add a compatible PostgreSQL database as a telemetry-only project, or attach telemetry to a Neon or Supabase project for workload context. DatabaseMeter keeps direct database observations separate from provider metering and billing.

A first-class PostgreSQL project

One direct database becomes one project in the same inventory used for Neon and Supabase. PostgreSQL 14 through 18 are supported for new direct connections.

  • Organize the project with environment and tags.
  • Choose manual, hourly, six-hour, or daily collection.
  • Retain history across a credential removal and reconnect.

Database size and growth

Read-only catalog and statistics queries capture compatible database, table, index, and other relation-size observations over time.

  • Compare available 7- and 30-day growth.
  • See relation-level size and scan clues.
  • Include compatible database size in portfolio totals without mixing unlike storage categories.

Sessions and aggregate workload

Core telemetry includes database counters and grouped session metadata. When pg_stat_statements and role visibility are configured, reset-aware aggregate workload contributors become available. PostgreSQL telemetry explains the database layer; Guided Agentic AI's guide to application observability and reliability covers the broader production context.

  • SQL text is never selected or stored.
  • Fingerprints and cumulative counters are compared only across compatible intervals.
  • Missing or unreadable pg_stat_statements does not disable useful core telemetry.

A dedicated read-only role

Guided setup creates copy-ready SQL for a database-specific login with no superuser, database creation, role creation, replication, or RLS-bypass privileges.

  • No application-table DML or DDL permission is requested.
  • Sessions default to read-only with bounded statement and lock timeouts.
  • The monitoring password is encrypted server-side and never displayed after storage.

Verified destination security

Direct connections require a publicly reachable PostgreSQL endpoint and certificate-verified TLS. Public certificate chains work directly; a bounded provider CA can be supplied for services such as Aiven. Every resolved address is validated before a connection is pinned to an approved IP while preserving hostname verification.

  • Private, loopback, link-local, metadata, reserved, and mixed public/private destinations are rejected.
  • Unix sockets, multiple hosts, insecure TLS modes, client certificates, and routing overrides are unsupported.
  • Destination validation runs again for later scheduled collections.

Honest capability boundaries

A PostgreSQL connection exposes database telemetry—not a cloud provider account. Values that require a provider API remain unavailable instead of being inferred or replaced with zero.

  • No provider project discovery, plan, compute, egress, storage capacity, or cost estimate.
  • Database growth, workload-change, and synchronization alerts use only available telemetry.
  • Removing the credential stops collection but retains history; permanent deletion is a separate explicit action.

What PostgreSQL monitoring actually means

PostgreSQL keeps running statistics about itself. Every table scan, index lookup, connection, and cached page is counted internally and exposed through system views and catalog tables. Monitoring is nothing more exotic than reading those counters on a schedule and comparing today's values with last week's.

This matters because a database rarely fails suddenly. It drifts. A table quietly triples in size, an index stops being used, dead rows pile up faster than autovacuum removes them, connections accumulate. Each change is invisible on any single day and obvious across a month — but only if something recorded the history.

You do not need to be a database administrator to benefit from this. You need four habits: know how big things are, know how fast they are growing, know what is running, and know when something changed.

The signals worth learning first

PostgreSQL exposes hundreds of metrics. For a novice running a small application database, a short list explains most real problems.

  • Database and table size. Start here, because everything else becomes easier to interpret once you know where the bytes are. See how to check PostgreSQL database size.
  • Index size. Indexes make reads fast and writes slower, and they consume real space. Unused indexes are pure cost — measuring index size shows how to find them.
  • Dead tuples and autovacuum. PostgreSQL does not overwrite rows in place; updates and deletes leave dead versions that autovacuum reclaims later. When it falls behind, tables bloat. Read dead tuples and autovacuum.
  • Sequential scans. A large table being read end to end on every query usually means a missing index — see sequential scans.
  • Connections and session state. pg_stat_activity shows what is connected right now, and idle in transaction covers the state that blocks cleanup and holds locks.
  • Cache hit behavior. Whether reads are served from memory or disk changes performance dramatically — see cache and I/O statistics.
  • Aggregate query workload. With pg_stat_statements enabled, you can see which query shapes consume the most total time, which is almost never the query you would have guessed.

Why your database grows even when you are not adding data

This is the question new users ask most often, and the answer is rarely "you have too many rows." PostgreSQL's storage model means space is consumed by more than the data you think you inserted.

Updates and deletes create dead row versions that occupy space until autovacuum reclaims it, and reclaimed space is usually reused rather than returned to the operating system. Indexes grow alongside their tables and can become bloated on their own. Write-ahead log files, temporary files from large sorts, and toasted large values all take room. Append-only tables like logs, events, sessions, and webhook payloads grow forever unless something deletes from them.

The practical approach is to identify the largest relations first, then ask whether that specific object should be that large. Why a PostgreSQL database keeps growing works through the causes in order, and the database growth calculator projects where a current trend leads.

Reading statistics without misleading yourself

Most PostgreSQL statistics are cumulative counters that increase since the last reset. A single reading tells you almost nothing; the difference between two readings is the useful number. Comparing across a statistics reset or a server restart produces nonsense, which is why DatabaseMeter only compares values across intervals it knows are compatible.

Ratios deserve the same skepticism. A high cache hit ratio does not prove the database is healthy, and a table with many sequential scans is not automatically a problem if it holds twenty rows. Context — size, frequency, and trend together — is what turns a metric into a conclusion.

Connecting safely with a read-only role

The right way to connect any monitoring tool to PostgreSQL is a dedicated login that can read statistics and nothing else. DatabaseMeter generates copy-ready SQL for exactly that: a database-specific role with no superuser, no database or role creation, no replication, and no ability to bypass row-level security. It requests no permission to insert, update, delete, or alter your application tables.

Sessions default to read-only with bounded statement and lock timeouts, so a monitoring query cannot hang and cannot hold a lock that blocks your application. SQL text is never selected or stored — only fingerprints and aggregate counters. The password is encrypted server-side and is not displayed again after you save it.

Direct connections require a publicly reachable endpoint and certificate-verified TLS. Private, loopback, link-local, and cloud metadata addresses are rejected, insecure TLS modes are unsupported, and destination validation runs again before every scheduled collection rather than only at setup. The security model documents each control.

Try it before connecting anything

If you would rather see the value before creating an account, two public tools run without one. The PostgreSQL health check reviews size, connection utilization, autovacuum pressure, and scan behavior in a single pass and explains each observation in plain language. The pg_stat_statements analyzer ranks query shapes by total consumed time so you can see where the load really is.

For structured reading, the PostgreSQL Learn center covers each concept with safe, copy-ready SQL and notes on how to interpret what comes back — including the interpretations that commonly go wrong.

Frequently asked questions

Do I need to be a database administrator to monitor PostgreSQL?

No. Four habits cover most real problems: know how large your tables and indexes are, know how fast they are growing, know what is currently running, and get told when something changes materially. Everything else can wait until a specific symptom appears.

Why does my PostgreSQL database keep growing?

Usually because of dead row versions awaiting autovacuum, index growth, write-ahead log and temporary files, and append-only tables such as logs, events, and audit rows that nothing ever deletes from. Reclaimed space is normally reused internally rather than returned to the operating system, so size often plateaus instead of shrinking.

Which PostgreSQL versions can DatabaseMeter connect to?

PostgreSQL 14 through 18 are supported for new direct connections. The endpoint must be publicly reachable and must present a certificate that validates, either through a public chain or a supplied provider CA.

What permissions does the monitoring role need?

Only read access to statistics and catalog views. The generated role has no superuser, database creation, role creation, replication, or row-level-security bypass privileges, and no DML or DDL permission on your application tables.

Does DatabaseMeter store my queries or my data?

No. SQL text is never selected or stored, and row data is never read. Only fingerprints and aggregate counters are retained, and they are compared only across statistics intervals that are known to be compatible.

Will monitoring queries slow down my database?

The collection queries are bounded, read-only catalog and statistics reads that run on the schedule you choose — manual, hourly, six-hour, or daily. Sessions carry statement and lock timeouts so a collection cannot hang or block your application.

Can a direct PostgreSQL connection show me cost or plan information?

No. A database connection exposes database telemetry, not a cloud provider account. Plan, compute, egress, storage capacity, and cost values require a provider API and are shown as unavailable rather than being inferred or replaced with zero.

See the whole portfolio clearly.

Checking your secure session…

Looking for details? Visit the FAQ, contact us, or review the public dashboard tour, or review the PostgreSQL capability matrix, or review the direct-connection security model.