Re: [SQL] Auto-Vacuum?

From: Brian <signal(at)shreve(dot)net>
To: tim(at)dmcity(dot)net
Cc: pgsql-sql(at)hub(dot)org
Subject: Re: [SQL] Auto-Vacuum?
Date: 1999-01-28 19:04:29
Message-ID: Pine.LNX.4.02.9901281302370.338-100000@mercury.shreve.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 28 Jan 1999, Tim Perdue wrote:

> Just curious if anyone has written an vacuum shell script.
>

Just use cron:

00 01 * * * /usr/local/pgsql/bin/psql shrevenet_users -c "vacuum;"
01 01 * * * /usr/local/pgsql/bin/psql shrevenet_ftp -c "vacuum;"
02 01 * * * /usr/local/pgsql/bin/psql shrevenet_counter -c "vacuum;"

etc. Also before I vacuum, I dump each night (never can be too safe :)

00 00 * * * /usr/local/pgsql/bin/pg_dump shrevenet_users > /usr/local/pgsql/backups/shrevenet_users.dump
01 00 * * * /usr/local/pgsql/bin/pg_dump shrevenet_ftp > /usr/local/pgsql/backups/shrevenet_ftp.dump
02 00 * * * /usr/local/pgsql/bin/pg_dump shrevenet_counter > /usr/local/pgsql/backups/shrevenet_counter.dump

> At this point, I have been going in weekly and issuing the VACUUM;
> command manually.
>
> Now that tons of records are being inserted hourly, I want to vacuum
> 1-2 times a day.
>
> I could do this pretty easily with a simple Java/JDBC proram, but
> would rather just have a shell script go into psql. Unfortunately, I
> know nothing about shell scripting.
>
> Any tips or samples are appreciated.
>
> Tim
>
>
> ==
> ______________________________________________________
>
> Tim Perdue
> tim(at)perdue(dot)net
>
>
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>

--------------------------------------------------------------------------
Brian Feeny (BF304) | ShreveNet Inc. - Premium Internet Service Provider
Network Administrator | Shreveport, Louisiana - http://www.shreve.net/
signal(at)shreve(dot)net | Web Hosting, Virtual Domains, Storefronts,
(318)222-2NET x 109 | Database/Web Integration, 56k, ISDN, T1

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tim Perdue 1999-01-28 19:10:23 Re: [SQL] Auto-Vacuum?
Previous Message Tim Perdue 1999-01-28 18:46:02 Auto-Vacuum?