Fixed an issue where the suffix for Toast table size is not visible in the Statistics tab. Fixes #5895

This commit is contained in:
Pradip Parkale 2020-10-20 15:57:32 +05:30 committed by Akshay Joshi
parent 18cad32bd4
commit 7b9504bdfb
4 changed files with 7 additions and 6 deletions

View File

@ -19,4 +19,5 @@ Bug fixes
********* *********
| `Issue #5858 <https://redmine.postgresql.org/issues/5858>`_ - Ensure that search object functionality works with case insensitive string. | `Issue #5858 <https://redmine.postgresql.org/issues/5858>`_ - Ensure that search object functionality works with case insensitive string.
| `Issue #5895 <https://redmine.postgresql.org/issues/5895>`_ - Fixed an issue where the suffix for Toast table size is not visible in the Statistics tab.
| `Issue #5911 <https://redmine.postgresql.org/issues/5911>`_ - Ensure that macros should be run on the older version of Safari and Chrome. | `Issue #5911 <https://redmine.postgresql.org/issues/5911>`_ - Ensure that macros should be run on the older version of Safari and Chrome.

View File

@ -26,9 +26,9 @@ SELECT
pg_stat_get_analyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Analyze counter')) }}, pg_stat_get_analyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Analyze counter')) }},
pg_stat_get_autoanalyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Autoanalyze counter')) }}, pg_stat_get_autoanalyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }}, pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_relation_size(cl.reltoastrelid) CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_size_pretty(pg_relation_size(cl.reltoastrelid)
+ COALESCE((SELECT SUM(pg_relation_size(indexrelid)) + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
END AS {{ conn|qtIdent(_('Toast table size')) }}, END AS {{ conn|qtIdent(_('Toast table size')) }},
COALESCE((SELECT SUM(pg_relation_size(indexrelid)) COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=stat.relid)::int8, 0) FROM pg_index WHERE indrelid=stat.relid)::int8, 0)

View File

@ -26,9 +26,9 @@ SELECT
analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }}, analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }},
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }}, autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }}, pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_relation_size(cl.reltoastrelid) CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_size_pretty(pg_relation_size(cl.reltoastrelid)
+ COALESCE((SELECT SUM(pg_relation_size(indexrelid)) + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
END AS {{ conn|qtIdent(_('Toast table size')) }}, END AS {{ conn|qtIdent(_('Toast table size')) }},
COALESCE((SELECT SUM(pg_relation_size(indexrelid)) COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=stat.relid)::int8, 0) FROM pg_index WHERE indrelid=stat.relid)::int8, 0)

View File

@ -22,9 +22,9 @@ SELECT
last_analyze AS {{ conn|qtIdent(_('Last analyze')) }}, last_analyze AS {{ conn|qtIdent(_('Last analyze')) }},
last_autoanalyze AS {{ conn|qtIdent(_('Last autoanalyze')) }}, last_autoanalyze AS {{ conn|qtIdent(_('Last autoanalyze')) }},
pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }}, pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_relation_size(cl.reltoastrelid) CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_size_pretty(pg_relation_size(cl.reltoastrelid)
+ COALESCE((SELECT SUM(pg_relation_size(indexrelid)) + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
END AS {{ conn|qtIdent(_('Toast table size')) }}, END AS {{ conn|qtIdent(_('Toast table size')) }},
COALESCE((SELECT SUM(pg_relation_size(indexrelid)) COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=stat.relid)::int8, 0) FROM pg_index WHERE indrelid=stat.relid)::int8, 0)