pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: raja kumar thatte <trajakumar@yahoo.com>
To: Leong, Fushan <fushan.leong@SonoSite.com>
To: pgsql-admin@postgresql.org
Subject: Re: Vaccum
Date: Thu, 29 Nov 2001 20:06:39 -0800 (PST)
Message-ID: <20011130040639.5822.qmail@web20602.mail.yahoo.com> (raw)
In-Reply-To: <2DFBC8374F5A0F4E954C07C158844F323886D8@milton.sonosite.com>


 No problem, we are doing vaccume different tables at different times.
Because if you do vaccume it will decrease the performace of data base
you can write scripts like this.
-----cleanTable.sh--------------------
#!/sbin/sh
echo "############## START:## Clean Table  $1 ##"
/usr/local/pgsql/bin/psql -U xxxxx -d xxxxxxx << end
vacuum  verbose  analyze $1;
\q
end
echo "############## END:## Clean Table  $1 ##"

-----cleanDB.sh--------------------------

#!/sbin/sh

#the following entry should be made in crontab of postgresql account
#5      *       *       *       *       $HOME/cleanDB.sh

echo "############## START:## Clean DB ## "`date '+%d/%m/%y %H:%M:%S'`
HOR=`date '+ %H'`
if [ $HOR -eq 19 ]; then
        /sbin/sh $HOME/cleanTable.sh aaaaaaaaaaa
        /sbin/sh $HOME/cleanTable.sh bbbbbbbbbbbb

elif [ $HOR -eq 20 ]; then
        /sbin/sh $HOME/cleanTable.sh cccccccccccc

elif [ $HOR -eq 21 ]; then
        /sbin/sh $HOME/cleanTable.sh dddddd
         /sbin/sh $HOME/cleanTable.sh eeeeeee

elif [ $HOR -eq 22 ]; then
        /sbin/sh $HOME/cleanTable.sh ffffffff
        /sbin/sh $HOME/cleanTable.sh ggggggggggggg


elif [ $HOR -eq 03 ]; then
        /sbin/sh $HOME/cleanTable.sh hhhhhhhhh


else
        echo "-------Nothing to vacuum--------"
fi
echo "############## END  :## Clean DB ## "`date '+%d/%m/%y %H:%M:%S'`     
                                                          

__________________________________                     

  "Leong, Fushan" <fushan.leong@SonoSite.com> wrote: Hi :

Want to get your opinion.

I am thinking to schedule to run Vaccum everynight.

1) As I understand, Vaccum is the command to delete old data, right?
1) Do I have to stop the postmaster before run the Vaccum command?
2) Should I run it everynight? How often should I run it?

thanks
Fushan

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


---------------------------------
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.

view thread (8+ messages)

Message-ID: <20011130040639.5822.qmail@web20602.mail.yahoo.com>
Permalink:  ../20011130040639.5822.qmail@web20602.mail.yahoo.com/
Also on:    postgresql.org/message-id/20011130040639.5822.qmail@web20602.mail.yahoo.com

 · 

reply

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: trajakumar@yahoo.com, fushan.leong@SonoSite.com
  Subject: Re: Vaccum
  In-Reply-To: <20011130040639.5822.qmail@web20602.mail.yahoo.com>
  References: <2DFBC8374F5A0F4E954C07C158844F323886D8@milton.sonosite.com> <20011130040639.5822.qmail@web20602.mail.yahoo.com>

* 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