X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AE494D1B37A for ; Thu, 10 Jun 2004 07:56:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53426-08 for ; Thu, 10 Jun 2004 10:56:01 +0000 (GMT) Received: from emo.org.tr (emo.org.tr [195.142.105.9]) by svr1.postgresql.org (Postfix) with ESMTP id A936CD1B233 for ; Thu, 10 Jun 2004 07:55:57 -0300 (ADT) Received: by emo.org.tr (Postfix, from userid 41643) id 2EABE2FF04; Thu, 10 Jun 2004 13:55:56 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by emo.org.tr (Postfix) with ESMTP id ECFC7111ED4; Thu, 10 Jun 2004 13:55:56 +0300 (EEST) Date: Thu, 10 Jun 2004 13:55:54 +0300 (EEST) From: Devrim GUNDUZ X-X-Sender: devrim2@emo.org.tr To: akuppachi@hss.hns.com Cc: pgsql-admin@postgresql.org Subject: Re: Calculating size of the database tables In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/130 X-Sequence-Number: 13790 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, On Thu, 10 Jun 2004 akuppachi@hss.hns.com wrote: > I would appreciate any pointers to finding out the correct size occupied by > my database tables. Will the physical size of the "data" folder (as given > by 'ls' command) give me the true size, or is there any other sql command > that i can use to get this information? I am using PostgreSQL, version > 7.4.1 server libraries. Please see contrib/dbsize. From README file: " This module contains two functions that report the size of a given database or relation. E.g., SELECT database_size('template1'); SELECT relation_size('pg_class'); These functions report the actual file system space. Thus, users can avoid digging through the details of the database directories. " Regards, - -- Devrim GUNDUZ devrim~gunduz.org devrim.gunduz~linux.org.tr http://www.tdmsoft.com http://www.gunduz.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAyD48tl86P3SPfQ4RAu+dAJ9L4sfyaR9VRAA9jATcHxB/p9+lLQCg4/3a jlDyuD1rOxNrij7UqX5xuKs= =B0Mo -----END PGP SIGNATURE-----