Wednesday, June 15, 2011

размер базы postgres

можно посмотреть так:
postgres@postgres:~$ psql
Welcome to psql 8.3.8-eter1, 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

postgres=#

смотрим список баз:

postgres=# \l
Список баз данных
Имя | Владелец | Кодировка
-----------+----------+-----------
current | postgres | UTF8
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(4 rows)

postgres=#

ну, и собственно, размер базы:

postgres=# select pg_database_size('current');
pg_database_size
------------------
19200184300
(1 запись)

19 200 184 300

No comments: