Re: Autovacuum on by default?
От | Alvaro Herrera |
---|---|
Тема | Re: Autovacuum on by default? |
Дата | |
Msg-id | 20060824133843.GB18349@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: Autovacuum on by default? ("Larry Rosenman" <ler@lerctr.org>) |
Ответы |
Re: Autovacuum on by default?
|
Список | pgsql-hackers |
Larry Rosenman wrote: > Jim C. Nasby wrote: > > On Tue, Aug 22, 2006 at 11:08:49AM -0400, Tom Lane wrote: > >> "Jim C. Nasby" <jim@nasby.net> writes: > >>> If there's a bunch of activity on a table but stats are reset > >>> before a vacuum is run on it and then a vacuum is run, the user > >>> will still be left thinking that the table needs to be vacuumed. > >> > >> Except that autovac *won't* vacuum it if the stats have been reset. > >> So I'm not seeing that there's really a problem in practice. > > > > IIRC the stats also include info about regular (manual) vacuums, so > > the above scenario still applies. > > They do. The stats patch as applied captures both autovacuum and manual > vacuum > as well as analyze (both from the Autovacuum daemon and manual). But the original point still remains: if you manually VACUUM a table that does not have a pgstat entry, the pgstat system will drop the "vacuum timestamp" message on the floor without recreating the entry. I think there is a reasonable case for saying that a manual vacuum could hint pgstat to create the entry instead. On the other hand, if autovacuum never vacuums a table with no pgstat entry, then you could just create the pgstat entry in both cases and it would be the same anyway. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-hackers по дате отправления: