Skip to main content

Storage Tab (Postgres Data Sources)

The Storage tab of the Performance Analyzer shows where the space of a Postgres data source goes, how it grows and which part of it looks wasted. It draws on two metric groups, PG Storage Family and PG Storage Objects. Each takes one snapshot a day, so the tab changes once a day. For your own DataDios database, see Postgres Storage Tab.

All sizes on this tab are estimates, except the sizes in Biggest Objects. Estimates are counted from the page counts in the Postgres catalog, not read from disk, so they can be a little off, and they follow VACUUM and ANALYZE: a table that was just loaded may show too small until the next one runs.

Turn it on​

Both groups are off by default. They collect only when you select them.

  1. In Data Explorer, open Edit on the Postgres data source and go to the Workload tab (see Enabling Workload Analysis).
  2. Make sure Enable workload analysis is on.
  3. In Workflows, select PG Storage Family and PG Storage Objects, then Save.

The tab shows data after the first daily snapshot has run. Only a Privileged user sees the Storage tab.

What is read​

  • Every database the data source can connect to, one after the other, and every schema in it except the system schemas (pg_* and information_schema).
  • Postgres older than 13 is skipped. Such a database is left out and a line is written to the log.
  • A database that cannot be reached or read is skipped and does not stop the others. If nothing could be read at all (every database is unreachable or older than 13), the run fails instead of saving an empty snapshot.

The charts show names as database.schema.family. Biggest Objects shows the database in its Schema column (database.schema) and the bare family name in Family.

The views​

ViewShapeWhat it shows
Where Space Goes (Top Families, Estimated)Stacked bar chartThe 10 biggest table families, each split into Heap (the table data), Index and Toast
Growth Per Day (Top Families, Estimated)Area chart, one series per familyBytes added per day by the 10 biggest families
Where It Is Wasted (Estimated)TableFuture and stale partitions, unused and duplicate indexes, and more, one row each
Biggest ObjectsTableThe biggest tables and indexes, and the unused and duplicate indexes, one row each

A table family is one table with all its partitions, or a plain table that has none. Toast is the separate storage Postgres uses for large values.

The views work as on the DataDios tab, and the rules for what counts as waste are the same: see The views, Where It Is Wasted and Biggest Objects. These things differ:

  • Rows from several databases appear together, so the Schema column of Biggest Objects reads database.schema.
  • On the DataDios tab only your own schema is read. Here every non-system schema of every database is read.
  • The Tables with no retention and Detached kept tables rows appear only on the DataDios datasource's tab (see below).
  • The statistics age is per database, so blanks and the (at least) total can appear (see below).

Retention is a DataDios concept, so the Tables with no retention and Detached kept tables rows appear only on the DataDios datasource's tab. For a Postgres datasource, your own retention settings are never read or shown, and there are no retention metrics in this view. The waste table covers future, empty and stale partitions, unused and duplicate indexes, and indexes bigger than the table, with a Total row. The statistics age is per database: where a database's statistics are too young, its rows are blank and not counted. The Note then says for how many rows the numbers are missing, as N of M rows, and the Total reads (at least).

Known limits​

  • Unused and stale numbers are blank for the first 7 days after Postgres started counting reads.
  • Biggest Objects lists at most 200 rows in total, not per database. When more objects qualify, the cap keeps duplicate indexes first, then unused indexes, then the biggest objects. The table itself is sorted by Size, biggest first, and an object that fits several reasons shows once, as in Biggest Objects.
  • The suggestions are hints. Check a partition or an index before you drop it.