User Tools

Site Tools


sysadmin_misc:postgresql

PostgreSQL

How to debug disk occupation in postgresql

  • get oid number from ncdu in /var/lib/postgresql
  • reconcile oid number and db name : select oid,datname from pg_database where oid=18595;
  • Then in database : select table_name,pg_relation_size(quote_ident(table_name)) from information_schema.tables where table_schema = 'public' order by 2;
sysadmin_misc/postgresql.txt · Last modified: 2018/09/25 15:00 (external edit)