{{template "header.tpl" .}} {{template "server/navbar.tpl" .}}

Diagnostics

List of Potential Issues  
Table Bloat{{if .DB}} in Database {{.DB}}{{end}}
{{if eq "" .TableBloatBytes}}

Not enough data to compute.

{{else if le .TableBloatPct 20.0}}

Overall table bloat ({{printf "%.1f" .TableBloatPct}}%, {{.TableBloatBytes}}) is within 20%.

{{else if le .TableBloatPct 100.0}}

Overall table bloat ({{printf "%.1f" .TableBloatPct}}%, {{.TableBloatBytes}}) is moderately high.

{{else}}

Overall table bloat ({{printf "%.1f" .TableBloatPct}}%, {{.TableBloatBytes}}) is high.

{{end}}

Table bloat wastes space and slows down queries. Find out the most bloated tables with the Top k tool. You might want to adjust the autovacuum parameters or run VACUUM manually.

Top 10 Most Bloated Tables
{{range .BloatedTables}} {{end}}
Table Size Bloat ↓
{{.Name}} {{.Size}} {{.BloatBytes}}
Index Bloat{{if .DB}} in Database {{.DB}}{{end}}
{{if eq "" .IndexBloatBytes}}

Not enough data to compute.

{{else if le .IndexBloatPct 20.0}}

Overall index bloat ({{printf "%.1f" .IndexBloatPct}}%, {{.IndexBloatBytes}}) is within 20%.

{{else if le .IndexBloatPct 100.0}}

Overall index bloat ({{printf "%.1f" .IndexBloatPct}}%, {{.IndexBloatBytes}}) is moderately high.

{{else}}

Overall index bloat ({{printf "%.1f" .IndexBloatPct}}%, {{.IndexBloatBytes}}) is high.

{{end}}

Index bloat wastes space and slows down queries. Find out the most bloated indexes with the Top k tool. You might want to run full VACUUMs or REINDEX selectively to fix this problem.

Top 10 Most Bloated Indexes
{{range .BloatedIndexes}} {{end}}
Index Table Size Bloat ↓
{{.Name}} {{.TableName}} {{.Size}} {{.BloatBytes}}
Inactive Replication Slots
{{if .InactiveRS}}

There are {{.InactiveRS}} inactive replication slots.

{{else}}

There are no inactive replication slots.

{{end}}

PostgreSQL will retain WAL files if they will be needed to resume the replication on a replication slot. If a replication slot is inactive, WAL files will be retained indefinitely. The Replication page lists all replication slots. Use the tool that created the slot in the first place, or use pg_drop_replication_slot to remove unwanted replication slots.

List of Inactive Replication Slots
{{range .InactiveSlots}} {{end}}
Name Type Temporary?
{{.Name}} {{if .Physical}}Physical{{else}}Logical{{end}} {{if .Temporary}}{{else}}{{end}}
Disabled Triggers{{if .DB}} in Database {{.DB}}{{end}}
{{if .DisabledTC}}

There are {{.DisabledTC}} disabled triggers.

{{else}}

There are no disabled triggers.

{{end}}

Triggers are sometimes inadvertently left disabled after activities like data migration or debugging, resulting in inconsitent data or unexpected behavior. pgDash lists disabled triggers for each monitored database. Use ALTER TABLE to re-enable triggers or DROP TRIGGER to remove them.

List of Disabled Triggers
{{range .DisabledTrigs}} {{end}}
Name Table Procedure
{{.Name}} {{.Table}} {{.Proc}}
Regular VACUUM{{if .DB}} in Database {{.DB}}{{end}}
{{if gt .NoVacuum 0}}

{{.NoVacuum}} tables haven't been vacuumed in the last 7 days.

{{else if eq .NoVacuum 0}}

All tables were vacuumed sometime in the last 7 days.

{{else}}

Not enough information.

{{end}}

Running VACUUM regularly, or setting up autovacuum to perform them automatically, keeps table bloat under control. Tables that haven't been VACUUMed recently can be found using the Top k tool.

Top 10 Longest Since Last Vacuum
{{range .LongestVacuum}} {{end}}
Table Last Vacuum ↓
{{.Name}}
Regular ANALYZE{{if .DB}} in Database {{.DB}}{{end}}
{{if gt .NoAnalyze 0}}

{{.NoAnalyze}} tables haven't been analyzed in the last 7 days.

{{else if eq .NoAnalyze 0}}

All tables were analyzed sometime in the last 7 days.

{{else}}

Not enough information.

{{end}}

Running ANALYZE regularly, typically along with VACUUM, keeps planner statistics updated and results in faster queries. Tables that haven't been ANALYZEd recently can be found using the Top k tool.

Top 10 Longest Since Last Analyze
{{range .LongestAnalyze}} {{end}}
Table Last Analyze ↓
{{.Name}}
Long Running Transactions{{if .DB}} in Database {{.DB}}{{end}}
{{if gt .TxTooLong 0}}

{{.TxTooLong}} transactions are currently running for more than 5 minutes.

{{else if eq .TxTooLong 0}}

No on-going transactions have been open for longer than 5 minutes.

{{else}}

Not enough information.

{{end}}

Long-running transactions can create more bloat in the database. You can see which transactions are open, doing what and for how long from the Backends page. Redesign application logic to avoid holding on to a transaction for longer than necessary.

Top 10 Longest Running Transactions
{{range .LongestTrans}} {{end}}
PID User Application Client Database Transaction Start ↓ Query
{{.PID}} {{.User}} {{.Application}} {{.Client}} {{.Database}} {{.Query}}
Unused Indexes{{if .DB}} in Database {{.DB}}{{end}}
{{if gt .UnusedIdx 0}}

There are {{.UnusedIdx}} unused indexes.

{{else}}

All indexes are in use.

{{end}}

Indexes which are not being used to assist with any SELECT query or to enforce constraints only serve to slow down INSERTs and UPDATEs. pgDash lists each index along with the number of times it has been scanned for each monitored database. Review and DROP INDEX any unwanted indexes.

Top 10 Unused Indexes By Size
{{range .UnusedIndexes}} {{end}}
Index Table Size ↓
{{.Name}} {{.TableName}} {{.Size}}
Deadlocks{{if .DB}} in Database {{.DB}}{{end}}
{{if gt .Deadlocks 0}}

There were {{.Deadlocks}} in the last 24 hours.

{{else}}

There were no deadlocks in the last 24 hours.

{{end}}

PostgreSQL resolves deadlock situations by aborting and rolling back a transaction involved in the deadlock. More details, including the offending SQL statements, will be written to the log file. pgDash tracks the number of deadlocks for each monitored database. Review application logic to audit explicit lock handling and order of lock acquisition.

Memory Usage
{{if gt .MaxMemUsedPct 80.0}}

Maximum memory usage in the last 24 hours was {{printf "%.1f" .MaxMemUsedPct}}% ({{.MaxMemUsed}}).

{{else if gt .MaxMemUsedPct 70.0}}

Maximum memory usage in the last 24 hours was {{printf "%.1f" .MaxMemUsedPct}}% ({{.MaxMemUsed}}).

{{else if eq .MaxMemUsed ""}}

Not enough information.

{{else}}

Maximum memory usage in the last 24 hours was {{printf "%.1f" .MaxMemUsedPct}}% ({{.MaxMemUsed}}).

{{end}}

Ensure you have enough free memory to cover unexpected usage spikes.

Load Average
{{if lt .MaxLoadAvg 0.0}}

Not enough information.

{{else if .WarnLoadAvg}}

Maximum load average in the last 24 hours was {{.MaxLoadAvg}}.

{{else}}

Maximum load average in the last 24 hours was {{.MaxLoadAvg}}.

{{end}}

A load average higher than the number of CPU cores indicates processes waiting for CPU cores to become available. Ensure you have enough CPU cores to support concurrent PostgreSQL connections.

Disk Usage
{{if eq .DiskFree 2}}

At least one tablespace is on a filesystem with less than 20% free disk space.

{{else if eq .DiskFree 1}}

At least one tablespace is on a filesystem with less than 30% free disk space.

{{else if eq .DiskFree 0}}

There is at least 30% free disk space for all tablespaces.

{{else}}

Not enough information.

{{end}}

Ensure that there is enough free disk space to cover spikes in disk usage, like queries that require temporary tables. The performance of some filesystems might degrade as free disk space becomes low. The Tablespaces page lists all tablespaces and their usage. You can move tables and indexes to other tablespaces or other servers to support data growth.

{{if .LowDiskTSes}} Top 10 Tablespaces With Least Free Disk Space
{{range .LowDiskTSes}} {{end}}
Name Location Disk Total Disk Used Use % ↓
{{.Name}} {{.Location}} {{.DiskTotal}} {{.DiskUsed}} {{.UsePct}}
{{end}}
{{template "server/delete-modal.tpl" .}} {{template "server/sharing-modal.tpl" .}} {{template "footer-pre.tpl" .}} {{template "footer-post.tpl" .}}