Skip to content

Instantly share code, notes, and snippets.

View duuz's full-sized avatar
:octocat:
Focusing

Eduardo Augusto duuz

:octocat:
Focusing
View GitHub Profile
@duuz
duuz / Links
Last active September 24, 2018 16:21
Links
@duuz
duuz / permissão grafana
Last active September 11, 2018 16:47
usar este comando pra permitir que o server use portas < 1024
setcap 'cap_net_bind_service=+ep' /usr/sbin/grafana-server
@duuz
duuz / localusage.sql
Created September 3, 2018 18:55
Tamanho das tabelas(Disco) no PostgreSQL
SELECT esquema, tabela,
pg_size_pretty(pg_relation_size(esq_tab)) AS tamanho,
pg_size_pretty(pg_total_relation_size(esq_tab)) AS tamanho_total
FROM (SELECT tablename AS tabela,
schemaname AS esquema,
schemaname||'.'||tablename AS esq_tab
FROM pg_catalog.pg_tables
WHERE schemaname NOT
IN ('pg_catalog', 'information_schema', 'pg_toast') ) AS x
ORDER BY pg_total_relation_size(esq_tab) DESC;