From: | "Stefano Dal Pra" <s(dot)dalpra(at)gmail(dot)com> |
---|---|
To: | Stéphane Schildknecht <stephane(dot)schildknecht(at)postgresqlfr(dot)org> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Vacuum goes worse |
Date: | 2007-10-17 14:35:16 |
Message-ID: | 290a5abc0710170735w601b8336v2645e90a54be0e10@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Your first post says vacuum goes worse (slower).
I see that you do not issue the -f option (FULL VACUUM).
I had a similar situation with a server (with frequent update)
performing nightly vacuumdb. After a few many days it went
slower and slower.
The first solution was to add the -f switch.
Note that it leads to table lock (see docs :-)
the FULL option completely rewrite the table on disk making it much
more compact
(i think of it similar to a "defrag" on windows). I had a dramatic
speed improvement
after the first vacuum full.
latest solution (psql 8.0.1) was a perl script which selectively
chooses tables to
full vacuum basing on results from this select:
SELECT a.relname, a.relpages FROM pg_class a ,pg_stat_user_tables b
WHERE a.relname = b.relname order by relpages desc;
this was to see how much a table's size grows through time.
With psql 8.2.x we adopted pg_autovacuum which seems to perform good,
even thought
i do not clearly understand whether it occasionally performs a full
vacuum (i think he does'nt).
Stefano
On 10/17/07, Stéphane Schildknecht
<stephane(dot)schildknecht(at)postgresqlfr(dot)org> wrote:
> Tom Lane a écrit :
> > "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> writes:
> >
> >> On 10/16/07, St=E9phane Schildknecht
> >> <stephane(dot)schildknecht(at)postgresqlfr(dot)org> wrote:
> >>
> >>> That's also why I am so disappointed vacuum doesn't give me these 4
> >>> hints lines.
> >>>
> >
> >
> >> What kind of error, or output, does it give you at the end? Any hint
> >> as to why they're missing?
> >>
> >
> > If you're talking about the FSM statistics display, that only gets
> > printed by a database-wide VACUUM (one that doesn't name a specific
> > table).
> >
>
> Yes, I am. The command line is (in a shell script whom ouput is
> redirected in a global file) :
>
> vacuumdb -d $DBNAME -p $DBPORT -U $DBUSR -z -v
>
>
> That does not explain why we don't get FSM statitics display. The output
> ends with:
> INFO: vacuuming "public.sometable"
> INFO: "sometable": removed 62 row versions in 3 pages
> DETAIL: CPU 0.00s/0.00u sec elapsed 0.00 sec.
> INFO: "sometable": found 62 removable, 5 nonremovable row versions in 5
> pages
> DETAIL: 0 dead row versions cannot be removed yet.
> There were 534 unused item pointers.
> 0 pages are entirely empty.
> CPU 0.00s/0.00u sec elapsed 0.00 sec.
> INFO: analyzing "public.sometable"
> INFO: "sometable": scanned 5 of 5 pages, containing 5 live rows and 0
> dead rows; 5 rows in sample, 5 estimated total rows
> VACUUM
>
> Best regards,
>
> Stéphane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-10-17 15:53:46 | Re: Vacuum goes worse |
Previous Message | Alvaro Herrera | 2007-10-17 13:43:28 | Re: Vacuum goes worse |