Martin Pihlak escribió: > I wrote: > > I was thinking that the launcher should only request fresh stats at wakeup, > > the workers could then reuse that file. This could be implemented by calling > > pgstat_clear_snapshot only at launcher wakeup and setting max stats age to > > to autovacuum_naptime for the workers. > > Attached is a patch that increases the autovacuum stats age tolerance to > autovacuum_naptime. This is handled by autovac_refresh_stats() by not clearing > the stats snapshot unless nap time elapsed or explicitly forced by an error > or SIGHUP.
You missed putting back the BUG comment that used to be there about this. In other words I think this is a bad idea, because there is a very wide window for a table to be vacuumed twice. Since naptime can be arbitrarily large, this is an arbitrarily large bug. I'm sure there are other ways to fix this, but please propose those before this patch. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers