Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 687839FA2CB for ; Wed, 18 Apr 2007 00:14:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 00512-08 for ; Wed, 18 Apr 2007 00:14:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by postgresql.org (Postfix) with ESMTP id C6F309FA43F for ; Wed, 18 Apr 2007 00:02:29 -0300 (ADT) Received: from new-host.home ([71.166.59.121]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JGO00DTK8BRA1H1@vms040.mailsrvcs.net> for pgsql-admin@postgresql.org; Tue, 17 Apr 2007 21:02:15 -0500 (CDT) Date: Tue, 17 Apr 2007 22:01:48 -0400 From: Robert Treat Subject: Re: Checking a size of a given database In-reply-to: To: pgsql-admin@postgresql.org Cc: "Milen A. Radev" Message-id: <200704172201.49061.robert@omniti.com> Organization: OmniTI MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Content-disposition: inline References: <4624A530.40108@rokcorp.com> User-Agent: KMail/1.9.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/198 X-Sequence-Number: 25262 On Tuesday 17 April 2007 07:39, Milen A. Radev wrote: > Chuck Amadi =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0: > > I have been given a task to try a proof of concept of migrating are > > active databases from PostgreSQL 8.0.1 to 8.2.3 > > > > I will install and configPostgreSQL on my local w/s and replicate the > > database users etc etc. > > > > I have had a look inside /var/lib/pgsql/data/base and there are > > numerous files (db's) which I believe is where I can check data base > > size. > > > > 1 108012 114465 122407 1261267 1261963 17229 17233 17234 17235 > > 174066 19247 205009 21272 2793694 2794334 333245 333375 > > > > I am aware that Postgresql creates directories to keep each database in. > > These directories aren't names,they are kept as the *'OID's *of each > > database (oid's are*"object identifiers"*). > > > > Previously I just run pg_dump and thus run ls -lh on the db dump. Anyway > > of checking a size of a given database I have tried > > the sql using select pg_database_size ('dbaname'); but no joy. > > What does it mean "but no joy"? What was the error message? Well, given that the function doesn't exist in 8.0.1, I'd guess it means th= at=20 it didn't work for him. In 8.0.x you need to use the dbsize contrib module= =20 to get database size, or match things up manually on disk with select=20 oid,datname from pg_database.=20 =2D-=20 Robert Treat Database Architect http://www.omniti.com