From: | "Mendola Gaetano" <mendola(at)bigfoot(dot)com> |
---|---|
To: | "Jonathan Gardner" <jgardner(at)jonathangardner(dot)net>, "David A(dot) Leedom" <daleedom(at)hightowergroup(dot)com>, <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Backup and Restore |
Date: | 2003-06-08 10:48:52 |
Message-ID: | 002801c32dab$8dfe80f0$10d4a8c0@mm.eutelsat.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
"Jonathan Gardner" <jgardner(at)jonathangardner(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Mendola Gaetano | 2003-06-08 11:05:48 | Re: Disk I/O Monitoring |
Previous Message | Eko Pranoto | 2003-06-08 10:34:28 | DUMPall PG7.1.3 restore to PG7.3.2 |