Re: Calculation of Database Size in postgres

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Calculation of Database Size in postgres
Date: 2018-02-14 10:21:21
Message-ID: 1518603681.2402.0.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

pavan95 wrote:
> In postgres for knowing the size of a database we generally use the system
> administration function "pg_database_size('database_name')".
>
> I am curious to know how does this calculate internally from the pages(free
> pages/fragmented pages/full pages) stored in the disk?

It just adds up the sizes of the files that make up the database.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message pavan95 2018-02-14 10:23:57 Re: Calculation of Database Size in postgres
Previous Message pavan95 2018-02-14 10:17:50 Calculation of Database Size in postgres