Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elv3P-0003Y4-L5 for pgsql-admin@arkaria.postgresql.org; Wed, 14 Feb 2018 11:16:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elv3O-0004tu-At for pgsql-admin@arkaria.postgresql.org; Wed, 14 Feb 2018 11:16:46 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1elv3O-0004tk-0i for pgsql-admin@lists.postgresql.org; Wed, 14 Feb 2018 11:16:46 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1elv3E-0006rM-VI for pgsql-admin@postgresql.org; Wed, 14 Feb 2018 11:16:44 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 7AEBB41068; Wed, 14 Feb 2018 12:16:33 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id CEYuuVV17bYR; Wed, 14 Feb 2018 12:16:32 +0100 (CET) Message-ID: <1518606990.2402.2.camel@cybertec.at> Subject: Re: Calculation of Database Size in postgres From: Laurenz Albe To: pavan95 , pgsql-admin@postgresql.org Date: Wed, 14 Feb 2018 12:16:30 +0100 In-Reply-To: <1518603837502-0.post@n3.nabble.com> References: <1518603470895-0.post@n3.nabble.com> <1518603681.2402.0.camel@cybertec.at> <1518603837502-0.post@n3.nabble.com> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk pavan95 wrote: > Do you know how does it calculate internally using what functions or what > system catalogs or whatever? The functions are in backend/utils/adt/dbsize.c, note in particular db_dir_size which walks through a directory and adds up the sizes of all files therein. Yours, Laurenz Albe