From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Dawid Kuroczko <qnex42(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Stats not updated after rollback -- autovacuum confused. |
Date: | 2007-05-17 01:05:08 |
Message-ID: | 200705170105.l4H158t05325@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This has been saved for the 8.4 release:
http://momjian.postgresql.org/cgi-bin/pgpatches_hold
---------------------------------------------------------------------------
Dawid Kuroczko wrote:
> Hello, I have a system where there are mostly COPYs,
> which insert data into a table. Ocasionally a COPY will fail (and thus,
> dead rows appear), but as far as I can tell ROLLBACK is not reflected
> anywhere in the pg_stats_user_tables. And since there are no rows
> n_tup_upd or n_tup_del, therefore autovacuum will not fire for that table.
>
> I see two possible solutions:
> 1) let rollback increment both n_tup_ins and n_tup_del (or maybe
> n_tup_upd, at least)? This would be a good safeguard, I guess.
>
> 2) ANALYZE is able to see wether table is accumulating dead rows.
> It might be a good idea to make ANALYZE able hint autovacuum that
> some tables need VACUUM (that they exceed limits set for autovacuum).
>
> The 2nd point could be a TODO item, perhaps? Something like:
> When ANALYZE runs, make it note removable dead rows and non-removable
> dead rows. If removable dead rows exceed some threshold, hint autovacuum
> at that table.
>
> Regards,
> Dawid
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-05-17 01:05:18 | Re: temporal variants of generate_series() |
Previous Message | Bruce Momjian | 2007-05-17 01:04:27 | Re: Lack of urgency in 8.3 reviewing |