Opened 11 years ago

Closed 11 years ago

#1189 closed defect (fixed)

psql db size summary: broken in recent builds

Reported by: hamish Owned by: live-demo@…
Priority: major Milestone: OSGeoLive7.0
Component: OSGeoLive Keywords: pgsql, space



this was working in earlier nightly builds, but no longer:


## check how big the databases ended up
echo "Postgres database sizes:"
psql << EOF
SELECT pg_database.datname,
       pg_size_pretty(pg_database_size(pg_database.datname)) AS size
  FROM pg_database;

the error is:

Postgres database sizes:
psql: FATAL:  database "root" does not exist


it would be good to fix this asap as we deal with disc space issues.

thanks, Hamish

Change history (2)

comment:1 by wildintellect, 11 years ago

So it's trying to login to postgres with ident, which fails if the database is not specified or the user logging in doesn't have a db to match it's name.


sudo -u postgres psql
psql -d postgres (one above is more likely to work

comment:2 by kalxas, 11 years ago

Resolution: fixed
Status: newclosed

confirmed fixed in build 10635:

Postgres database sizes:
      datname       |  size   
 template1          | 5754 kB
 template0          | 5665 kB
 postgres           | 5754 kB
 user               | 5890 kB
 osm_local          | 38 MB
 pgrouting          | 30 MB
 sahana             | 30 MB
 mapbender3.0.0.2   | 8186 kB
 v2.2_mapfishsample | 10 MB
 52nSOS             | 24 MB
 RASBASE            | 67 MB
 petascopedb        | 7794 kB
 eoxserver_demo     | 15 MB
 cartaro            | 21 MB
 geonode            | 15 MB
 natural_earth2     | 82 MB
(16 rows)
Note: See TracTickets for help on using tickets.