From: Mendola Gaetano <mendola@bigfoot.com>
To: Jonathan Gardner <jgardner@jonathangardner.net>
To: David A. Leedom <daleedom@hightowergroup.com>
To: pgsql-admin@postgresql.org
Subject: Re: Backup and Restore
Date: Sun, 8 Jun 2003 12:48:52 +0200
Message-ID: <002801c32dab$8dfe80f0$10d4a8c0@mm.eutelsat.org> (raw)
References: <5.2.0.9.0.20030605075052.028d9888@mail.hightowergroup.com>
<200306051322.43748.jgardner@jonathangardner.net>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mendola@bigfoot.com, jgardner@jonathangardner.net, daleedom@hightowergroup.com
Subject: Re: Backup and Restore
In-Reply-To: <002801c32dab$8dfe80f0$10d4a8c0@mm.eutelsat.org>
References: <5.2.0.9.0.20030605075052.028d9888@mail.hightowergroup.com> <200306051322.43748.jgardner@jonathangardner.net> <002801c32dab$8dfe80f0$10d4a8c0@mm.eutelsat.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox