Re: the right time to vacuum database?

From: "Charles(dot)Hou" <ivan(dot)hou(at)msa(dot)hinet(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: the right time to vacuum database?
Date: 2007-06-07 07:07:03
Message-ID: 1181200023.281625.249120@n15g2000prd.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

On 6 7 , 3 51 , a(dot)(dot)(dot)(at)crankycanuck(dot)ca (Andrew Sullivan) wrote:
> On Tue, Jun 05, 2007 at 05:28:10PM -0700, Charles.Hou wrote:
> > Client connected: about 100 pc, 1 pc with 1 connection at least, the
> > max is 4 connections
>
> So up to 400 connections? Are they all running transactions? For
> any length of time?
>
> > 194 tables on the database, and some of the tables always executed
> > the update/insert command .
>
> So _some_ tables are getting updated? (Inserts are not really
> relevant to vacuuming here, but they'll surely be relevant to size)
>
> > i also set the autovacuum to enable. today, the database size is
> > 497MB. 497-440MB=57MB, 57 MB have been increased in 18 hours.
> > what's wrong with my PostgreSql Server?
>
> Maybe nothing. How much data do you think you're putting in there?
> What does VACUUM VERBOSE say, as I asked about -- are you getting a
> lot of dead space?
>
i use the VACUUM VERBOSE a table , but it had been hold 10 minutes . i
must use the linux command " kill " to exit the VACUUM.
after i kill this PID, the PostgreSql have been restart
automatically.

and vacuum result of the other table

INFO: vacuuming "public.trade_rpt"
INFO: "ftrade_rpt": found 987 removable, 117279 nonremovable row
versions in 16875 pages
DETAIL: 0 dead row versions cannot be removed yet.
Nonremovable row versions range from 324 to 1280 bytes long.
There were 9 unused item pointers.
Total free space (including removable row versions) is 9059076 bytes.
138 pages are or will become empty, including 0 at the end of the
table.
15838 pages containing 8772044 free bytes are potential move
destinations.
CPU 0.01s/0.00u sec elapsed 341.61 sec.

341.61sec???

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Simon Riggs 2007-06-07 07:50:35 Re: WAL restore
Previous Message Jerry Huff 2007-06-07 06:31:46 WAL restore

Browse pgsql-sql by date

  From Date Subject
Next Message Campbell, Lance 2007-06-07 16:08:35 subtract a day from the NOW function
Previous Message Andrew Sullivan 2007-06-06 19:51:01 Re: the right time to vacuum database?