Another pg_autovacuum patch

Поиск
Список
Период
Сортировка
От Matthew T. O'Connor
Тема Another pg_autovacuum patch
Дата
Msg-id 3FD393AB.8050403@zeut.net
обсуждение исходный текст
Ответы Re: Another pg_autovacuum patch
Список pgsql-patches
Ok, one more pg_autovacuum patch (Thanks to Tom for fixing the long long
overflow problem).

This patch addresses two minor issues (the last two pg_autovacuum bugs I
know of):

First the CountAtLastAnalyze varable was initially being set incorrectly
causing pg_autovacuum to perform unneeded analyzes on during startup.

Second, there was a debug print statement left in that was printing
relisshared.

The attached patch fixes both issues, and should be applied to both 7.4
and HEAD.

Thanks,

Matthew O'Connor

*** pg_autovacuum.c.orig    2003-12-07 15:25:08.000000000 -0500
--- pg_autovacuum.c    2003-12-07 15:46:07.000000000 -0500
***************
*** 108,114 ****

      new_tbl->CountAtLastAnalyze =
          (atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_ins"))) +
!          atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_upd"))));
      new_tbl->curr_analyze_count = new_tbl->CountAtLastAnalyze;

      new_tbl->CountAtLastVacuum =
--- 108,115 ----

      new_tbl->CountAtLastAnalyze =
          (atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_ins"))) +
!          atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_upd"))) +
!          atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_del"))));
      new_tbl->curr_analyze_count = new_tbl->CountAtLastAnalyze;

      new_tbl->CountAtLastVacuum =
***************
*** 120,126 ****
      new_tbl->reltuples = atoi(PQgetvalue(res, row, PQfnumber(res, "reltuples")));
      new_tbl->relpages = atoi(PQgetvalue(res, row, PQfnumber(res, "relpages")));

-     log_entry(PQgetvalue(res, row, PQfnumber(res, "relisshared")));
      if (strcmp("t", PQgetvalue(res, row, PQfnumber(res, "relisshared"))))
          new_tbl->relisshared = 0;
      else
--- 121,126 ----

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Double Backslash example patch
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: pg_autovacuum another one line patch