public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][RM5895]Toast table size in Statistics tab has no suffix
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][RM5895]Toast table size in Statistics tab has no suffix
@ 2020-10-19 05:26 Pradip Parkale <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Pradip Parkale @ 2020-10-19 05:26 UTC (permalink / raw)
To: pgadmin-hackers
Hi Hackers,
Please find the attached patch for #RM5895. Toast table size unit was
missing.
--
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
Attachments:
[application/octet-stream] RM5895.patch (4.0K, 3-RM5895.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql
index e8dab7ad0..ea428ccf2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql
@@ -26,9 +26,9 @@ SELECT
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_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))
- 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')) }},
COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=stat.relid)::int8, 0)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql
index 30137a8eb..dc038aee2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql
@@ -26,9 +26,9 @@ SELECT
analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }},
autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
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))
- 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')) }},
COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=stat.relid)::int8, 0)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql
index f3b2e19e3..59c52a352 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql
@@ -22,9 +22,9 @@ SELECT
last_analyze AS {{ conn|qtIdent(_('Last analyze')) }},
last_autoanalyze AS {{ conn|qtIdent(_('Last autoanalyze')) }},
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))
- 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')) }},
COALESCE((SELECT SUM(pg_relation_size(indexrelid))
FROM pg_index WHERE indrelid=stat.relid)::int8, 0)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][RM5895]Toast table size in Statistics tab has no suffix
@ 2020-10-20 11:48 Akshay Joshi <[email protected]>
parent: Pradip Parkale <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2020-10-20 11:48 UTC (permalink / raw)
To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers
Thanks, patch applied.
On Mon, Oct 19, 2020 at 10:57 AM Pradip Parkale <
[email protected]> wrote:
> Hi Hackers,
> Please find the attached patch for #RM5895. Toast table size unit was
> missing.
>
> --
> Thanks & Regards,
> Pradip Parkale
> Software Engineer | EnterpriseDB Corporation
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-10-20 11:48 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 05:26 [pgAdmin][RM5895]Toast table size in Statistics tab has no suffix Pradip Parkale <[email protected]>
2020-10-20 11:48 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox