Re: Backup and Restore

Поиск
Список
Период
Сортировка
От Mendola Gaetano
Тема Re: Backup and Restore
Дата
Msg-id 002801c32dab$8dfe80f0$10d4a8c0@mm.eutelsat.org
обсуждение исходный текст
Ответ на Backup and Restore  ("David A. Leedom" <daleedom@hightowergroup.com>)
Список pgsql-admin
"Jonathan Gardner" <jgardner@jonathangardner.net> wrote:
> This is also a cheap way to "vacuum" the database:
>
> # pg_dump <dbname> | gzip > dump.gz
> # dropdb <dbname>
> # createdb <dbname>
> # gunzip -c dump.gz > psql <dbname>

Yes specially when you have a dump of about 1 GB and
you manage a service 24/24 7/7!!

The only cheap way to vacuum is:

#vacuumdb <dbname>

if you want update the statistics too:

#vacuumdb -z <dbname>

and if you can handle to have an exclusive lock on tables:

#vacuumdb -f -z <dbname>

the only think that I suggest for bigs table with index is
to reindex that table:

#psql -t -c "reindex table <table_name>" <dbname>



Regards
Gaetano Mendola



В списке pgsql-admin по дате отправления:

Предыдущее
От: "Mendola Gaetano"
Дата:
Сообщение: Re: Disk I/O Monitoring
Следующее
От: "Eko Pranoto"
Дата:
Сообщение: DUMPall PG7.1.3 restore to PG7.3.2