Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 562489FBAFF for ; Wed, 1 Aug 2007 11:06:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 56764-01-4 for ; Wed, 1 Aug 2007 11:06:19 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id CE1929FBAC8 for ; Wed, 1 Aug 2007 11:06:27 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.8/8.13.8) with ESMTP id l71E6ITv057019 for ; Wed, 1 Aug 2007 11:06:18 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.8/8.13.8/Submit) id l71E3uTO055545 for pgsql-admin@postgresql.org; Wed, 1 Aug 2007 11:03:56 -0300 (ADT) (envelope-from news) From: Chris Browne X-Newsgroups: pgsql.admin Subject: Re: Raw disk space used Date: Wed, 01 Aug 2007 09:25:20 -0400 Organization: cbbrowne Computing Inc Lines: 22 Message-ID: <60ps27bd4v.fsf@dba2.int.libertyrms.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux) Cancel-Lock: sha1:IzwkFC+qabTCsHCGzkOoAnJXltk= To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/3 X-Sequence-Number: 26334 walterc@indiana.edu (Carol Walter) writes: > Is there a way to tell what the raw disk space used by a single > database is? I know that databases are fluid, but if there is way to > do even a snap shot view that is a "ball park" figure, I'd be happy. > My user keeps clammering for this figure. Sure, you can identify the database via "select oid, * from pg_catalog.pg_database;" Then you should be able to head to $PGDATA (where ever the database data lives), and run "du", and search for the directory whose name is the "oid" value for the database that you wanted to analyze. If users are using tablespaces, then tables can live in user-controlled places, which would make it rather more complex to do this analysis, but if they have kept to the simpler approach of just letting data fall where it will, this should do the trick... -- (reverse (concatenate 'string "gro.mca" "@" "enworbbc")) http://linuxfinances.info/info/linux.html "High-level languages are a pretty good indicator that all else is seldom equal." - Tim Bradshaw, comp.lang.lisp