Thanks for the response Bob. Well, I'm definately not much of a DB person, so I had to google this and look online but this is what I'm using based on a couple of results from my search. Since I'm not much of a DB person, I usually write notes about what I did for future. Here are my notes:
Login: sudo -u postgres psql Display DBs: ============ [r...@san-psip ~]# sudo -u postgres psql could not change directory to "/root" Welcome to psql 8.1.18, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit Listings of DBs: ================ postgres=# \l List of databases Name | Owner | Encoding -----------+----------+----------- fossology | fossy | SQL_ASCII postgres | postgres | UTF8 template0 | postgres | UTF8 template1 | postgres | UTF8 (4 rows) View DB size for fossology: =========================== postgres=# SELECT pg_database_size('fossology'); pg_database_size ------------------ 2710417276 (1 row) View DB size for fossology (human-readable): ============================================ postgres=# SELECT pg_size_pretty(pg_database_size('fossology')); pg_size_pretty ---------------- 2585 MB (1 row) However, you're right in what you use is displaying 0 when I run the query: ===================================================== r...@san-psip ~]# sudo -u postgres psql -d fossology could not change directory to "/root" Welcome to psql 8.1.18, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit fossology=# SELECT SUM(relpages) AS val FROM pg_class INNER JOIN pg_stat_all_tables ON pg_stat_all_tables.relname = pg_class.relname WHERE schemaname='public'; val ----- 0 (1 row) Do you know of a way I can fix/correct this because although the query fossology is using I'm guessing my DB is now zero. Any suggestions? -Regards, Gibran On Mon, Mar 1, 2010 at 6:40 AM, Gobeille, Robert <bob.gobei...@hp.com> wrote: > Hi Gibran, > How did you select the size of the fossology db? > We use: > SELECT SUM(relpages) AS val FROM pg_class INNER JOIN pg_stat_all_tables ON > pg_stat_all_tables.relname = pg_class.relname WHERE schemaname='public' > > My machine is running postgresql 8.3.9. I haven't verified this on a higher > rev. > > Bob > _______________________________________________ fossology mailing list fossology@fossology.org http://fossology.org/mailman/listinfo/fossology