> > I'm not sure I understand what you mean. > > The timestamp *IS* updated on every write - see this: > > > https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3469 > I mean that usually 99.9% writes goes through mmap, which update the pgstat.tmp file timestamp (but not update last_statwrite value). But that enough to make backend_read_statsfile happy around https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3972 without kicking poor statistic collector (and forcing full file rewrite) at https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3978 PS: 1second autovacuum_naptime could be useful if you have small but very very actively updated tables, over 1 minute they could growth 100-500x size without autovacuum. 1minute naptime will have the same issue with 500 small idle databases :). -- Maxim Boguk Senior Postgresql DBA http://www.postgresql-consulting.ru/ <http://www.postgresql-consulting.com/>
pgsql-bugs by date:
Соглашаюсь с условиями обработки персональных данных