postgres=# \c demo
You are now connected to database "demo" as user "postgres".
demo=# SELECT nspname || '.' || relname AS "relation",
demo-# pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
demo-# FROM pg_class C
demo-# LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
demo-# WHERE nspname NOT IN ('pg_catalog', 'information_schema')
demo-# AND C.relkind <> 'i'
demo-# AND nspname !~ '^pg_toast'
demo-# ORDER BY pg_total_relation_size(C.oid) DESC
demo-# LIMIT 20;
relation | total_size
------------------------+------------
public._inforg24222 | 6462 MB
public.config | 165 MB
public._inforg23805 | 34 MB
public._inforg24502 | 23 MB
public._inforg28528 | 23 MB
public._accumrg28622 | 21 MB
public._accumrg29176 | 18 MB
public._crg1079 | 16 MB
public._inforg31568 | 15 MB
public._accumrg28976 | 14 MB
public._inforg27395 | 13 MB
public._accumrg29535 | 12 MB
public._inforg31471 | 10 MB
public._inforg31504 | 9992 kB
public._accumrg29493 | 9616 kB
public._accumrg29219 | 9144 kB
public._accumrg29255 | 8176 kB
public._accumrgtn29205 | 7632 kB
public._accumrg29658 | 7344 kB
public._inforg26344 | 6600 kB
(20 rows)
demo=# \q
postgres@test:/root$ exit
root@test:~# выход
user@test:~$ time sudo su postgres -c "pg_dump -Fc demo" > ~/demo.dump
pg_dump: Ошибка выгрузки таблицы "_inforg24222": сбой в PQgetResult().
pg_dump: Сообщение об ошибке с сервера: ERROR: invalid memory alloc request size 1230291841
pg_dump: Выполнялась команда: COPY public._inforg24222 (_fld24223_type, _fld24223_rtref, _fld24223_rrref, _fld24224, _fld864) TO stdout;
real 4m14,566s
user 3m47,729s
sys 0m4,269s
~$ sudo su postgres
[sudo] пароль для user:
postgres@test:/home/user$ psql
psql (10.10 (Ubuntu 10.10-4.1C))
Введите "help", чтобы получить справку.
postgres=# \c demo
Вы подключены к базе данных "demo" как пользователь "postgres".
demo=# DELETE FROM public._inforg24222;
DELETE 1657
You are now connected to database "demo" as user "postgres".
demo=# SELECT nspname || '.' || relname AS "relation",
demo-# pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
demo-# FROM pg_class C
demo-# LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
demo-# WHERE nspname NOT IN ('pg_catalog', 'information_schema')
demo-# AND C.relkind <> 'i'
demo-# AND nspname !~ '^pg_toast'
demo-# ORDER BY pg_total_relation_size(C.oid) DESC
demo-# LIMIT 20;
relation | total_size
------------------------+------------
public._inforg24222 | 6462 MB
public.config | 165 MB
public._inforg23805 | 34 MB
public._inforg24502 | 23 MB
public._inforg28528 | 23 MB
public._accumrg28622 | 21 MB
public._accumrg29176 | 18 MB
public._crg1079 | 16 MB
public._inforg31568 | 15 MB
public._accumrg28976 | 14 MB
public._inforg27395 | 13 MB
public._accumrg29535 | 12 MB
public._inforg31471 | 10 MB
public._inforg31504 | 9992 kB
public._accumrg29493 | 9616 kB
public._accumrg29219 | 9144 kB
public._accumrg29255 | 8176 kB
public._accumrgtn29205 | 7632 kB
public._accumrg29658 | 7344 kB
public._inforg26344 | 6600 kB
(20 rows)
demo=# \q
postgres@test:/root$ exit
root@test:~# выход
user@test:~$ time sudo su postgres -c "pg_dump -Fc demo" > ~/demo.dump
pg_dump: Ошибка выгрузки таблицы "_inforg24222": сбой в PQgetResult().
pg_dump: Сообщение об ошибке с сервера: ERROR: invalid memory alloc request size 1230291841
pg_dump: Выполнялась команда: COPY public._inforg24222 (_fld24223_type, _fld24223_rtref, _fld24223_rrref, _fld24224, _fld864) TO stdout;
real 4m14,566s
user 3m47,729s
sys 0m4,269s
~$ sudo su postgres
[sudo] пароль для user:
postgres@test:/home/user$ psql
psql (10.10 (Ubuntu 10.10-4.1C))
Введите "help", чтобы получить справку.
postgres=# \c demo
Вы подключены к базе данных "demo" как пользователь "postgres".
demo=# DELETE FROM public._inforg24222;
DELETE 1657
Комментариев нет:
Отправить комментарий