While opening the Programs and Features tool panel on my Windows 7 (64-bit), I found that my postgresql (8.4) install was taking 108 GB. I do not use postgresql myself, I just use a tool that need a postgresql db, and I am fairly confident in the fact that my postgresql databases are not that large.

When I go to the install folder of postgresql (C:\Program Files (x86)\PostgreSQL) and then clicks on properties, it displays a size of 1.45 GB. In c:\users\postgres I get 13.5 MB. I end up quite astonished by the windows diagnosis of 108 GB.

So here is the question :
How could I calculate the whole size on disk taken by postgresql (including everything : soft, logs, db, tools, etc...). Is everything located under the install folder and the postgres user folder?

I also would like to have your views on which is responsible of the mistake (if any) about the size calculation in the tool panel, postgresql or windows? How could windows end up showing that very large size information?

Thanks for your inputs!

Edit : I made several searches on the windows tool after having read the @a_horse_with_no_name comment's, and found some detailled information :

So, only the my main question remains, how could I calculate the whole size taken by postgresql on my disk. Thanks.

  • 3
    I never found the size reported in the control panel to be accurate (for any program) I have no idea what Microsoft does there. – a_horse_with_no_name Jan 26 '13 at 12:03
  • Yes you are right. I was used to find quite accurate size info in this tools, but after having a closer look today, postgresql has an huge size, and other programs display ridiculously low sizes (e.g. games of several GB shows few MB). – zoom Jan 26 '13 at 12:31
  • Please consider posting this explanation as an answer to your own question. I'll +1 if you comment here after you do so. – Craig Ringer Jan 28 '13 at 5:10
  • I am not against it, but the main purpose of my question remains. How could I evaluate the whole size taken on disk by postgresql on Windows? Is it simply the size of the postgresql user folder + the program files/postgresql folder? I will post a summed up answer, after I get some inputs about that. Thank you. – zoom Jan 28 '13 at 7:59

Part of the difficulty here depends on setup. For this purpose I will assume a default setup. I am also assuming here that we aren't counting system libraries here, or connection libraries, only PostgreSQL itself (i.e. no dependencies, and not libpq).

The best place to start is indeed the sum of the user folder plus the program files/postgresql folder. If you are putting the logs elsewhere you will want to add those in as well.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.