Re: Unexpectedly high disk space usage

From: Lists <lists(at)benjamindsmith(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Postgresql Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unexpectedly high disk space usage
Date: 2012-11-06 18:49:38
Message-ID: 50995BC2.7040005@benjamindsmith.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I followed your example, the result is at the bottom. Based on this it
would seem that there are 3-4 databases that seem to be the culprit. How
could I get more depth/detail on what specifically is the problem?

-Ben

On 11/05/2012 07:10 PM, Scott Marlowe wrote:
> What does du -sh have to say about it? Use unix tools to examine your
> file system and see where the usage is going. For instance, I can do
> this: cd /var/lib/postgresql/8.4/main/ du -s *|sort -n 0 server.crt 0
> server.key 4 pg_tblspc 4 pg_twophase 4 PG_VERSION 4 postmaster.opts 4
> postmaster.pid 12 pg_clog 12 pg_stat_tmp 12 pg_subtrans 28
> pg_multixact 460 global 16392 pg_xlog 16396 base which tells me that
> I'm using about 16MB for each pg_xlog and base. I can then do cd into
> base and look around: cd base du -s *|sort -n 5416 1 5416 11563 5560
> 11564 Which shows me using about 5MB each for three different dbs. And
> so on. On an off guess, did you go from a SQL_ASCII encoding to UTF8?
> That might increase disk space usage a bit.

[root(at)delta ~]# cd /var/lib/pgsql/9.1/data/
[root(at)delta data]# du -s * | sort -n
4 pg_ident.conf
4 pg_serial
4 pg_tblspc
4 PG_VERSION
4 postmaster.opts
4 postmaster.pid
8 pg_hba.conf
12 pg_notify
12 pg_twophase
20 postgresql.300
20 postgresql.conf
20 postgresql.conf.20120903
20 postgresql.conf.300
76 pg_subtrans
104 pg_multixact
15044 pg_log
18184 global
25216 pg_stat_tmp
47916 pg_clog
671916 pg_xlog
164753204 base

[root(at)delta data]# cd base
[root(at)delta base]# du -s * | sort -n
4 pgsql_tmp
6124 12772
6388 12780
6424 1
72424 331506
72700 160676
72896 391655
73200 52389
73216 523672
74104 619675
74956 295646
76768 307580
77896 547597
80824 571547
87368 475799
90940 631604
113876 124651
123548 148525
130096 367533
149792 439726
173648 355578
175404 679545
190732 559580
225780 511706
326468 667547
352736 655477
398736 535644
469408 136582
483716 499753
513124 270926
575612 715601
590408 487780
666604 463779
713208 643540
714896 583515
803216 343438
806952 427663
855156 739506
872200 197221
975692 64371
987692 775594
1005268 595488
1024812 691482
1042212 727552
1047464 379566
1260044 76601
1276756 16384
1345072 403667
1474468 209158
1477808 172604
1536168 221124
1637652 258798
1811504 88598
1963740 245588
2076748 703467
2193536 415671
2430908 801322
2552640 319552
2785212 28315
3454880 112612
3755548 451666
3929420 100666
4651876 40451
5714940 751514
6257740 233293
7313900 184735
9334796 763606
10940780 283609
20837264 788338
45285640 607471

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2012-11-06 19:11:49 Re: Unexpectedly high disk space usage
Previous Message Lists 2012-11-06 18:48:31 Re: Unexpectedly high disk space usage