Bug in pg_autovacuum ?

Поиск
Список
Период
Сортировка
От Cott Lang
Тема Bug in pg_autovacuum ?
Дата
Msg-id 1074381764.2237.81.camel@blackbox
обсуждение исходный текст
Ответы Re: Bug in pg_autovacuum ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
I'm having a problem with pg_autovacuum against both 7.3.2 and 7.4.1 on
Redhat 9 and Fedora Core 1. I'm using pg_autovacuum from 7.4.1,
everything comes from the postgresql.org RPMs.

If the number of tuples is sufficiently high, pg reports 'reltuples'
back in TABLE_STATS_QUERY in scientific notation instead of an integer.

Example:

4.35351e+06 instead of 4353514

pg_autovacuum then uses atoi() to reach the incorrect conclusion that
there are 4 tuples.  Obviously, if that table gets more than a couple of
updates, it gets vacuumed a bit too often. :)

Changing from atoi() to atof() solves the problem completely.

new_tbl->reltuples =
  atof(PQgetvalue(res, row, PQfnumber(res, "reltuples")));

new_tbl->relpages =
  atof(PQgetvalue(res, row, PQfnumber(res, "relpages")));

I'm not sure how I can be the only person running into this. :)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1053: Configuration should be in /etc/postgres
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug in pg_autovacuum ?