> "Maksym Boguk" <maxim.bo...@gmail.com> writes: >> Somehow pg_database_size producing results which are 2х more then reality. > > I can't reproduce any such problem here. I suspect you overlooked some > tablespaces in your manual "du" commands. > > regards, tom lane >
No other tablespaces exists as can be seen in output of: SELECT oid,spcname,spclocation,pg_size_pretty(pg_tablespace_size(spcname)) from pg_tablespace; oid | spcname | spclocation | pg_size_pretty -------+------------+---------------+---------------- 1663 | pg_default | | 21 MB 1664 | pg_global | | 1092 kB 16443 | main | /db/base/main | 124 GB However I seem to have found reason for such strange behavior. That is a duplicating link in pg_tblspc: postgres@db:~$ ls -la /var/lib/postgresql/9.0/main/pg_tblspc/ total 8 drwx------ 2 postgres postgres 4096 Jun 3 04:08 . drwx------ 12 postgres postgres 4096 Sep 28 17:08 .. lrwxrwxrwx 1 postgres postgres 13 Jun 6 14:39 16384 -> /db/base/main lrwxrwxrwx 1 postgres postgres 13 Jun 3 04:08 16443 -> /db/base/main I have no idea how could this happen. No crashes/power-offs and so on happens on that database for more then year. Can the second (16384 -> /db/base/main) link be safely deleted? -- Maxim Boguk Senior Postgresql DBA. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs