Re: Fix overflow of bgwriter's request queue

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: Fix overflow of bgwriter's request queue
Дата
Msg-id 20060113155017.4E2E.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Fix overflow of bgwriter's request queue  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Список pgsql-patches
"Qingqing Zhou" <zhouqq@cs.toronto.edu> wrote:

>    while ((entry = (PendingOperationEntry *) hash_seq_search(&hstat)) != NULL)
>    {
> +   if (i >= count)
> +    elog(ERROR, "pendingOpsTable corrupted");
> +
> +   memcpy(&entries[i++], entry, sizeof(PendingOperationEntry));
> +
> +   if (hash_search(pendingOpsTable, entry,
> +       HASH_REMOVE, NULL) == NULL)
> +    elog(ERROR, "pendingOpsTable corrupted");
> +  }
>
> What's the rationale of this change?

AbsorbFsyncRequests will be called during the fsync loop in my patch,
so new files might be added to pendingOpsTable and they will be removed
from the table *before* writing the pages belonging to them.
So I changed it to copy the contents of pendingOpsTable to a local
variables and iterate on the vars later.

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories



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

Предыдущее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: Fix overflow of bgwriter's request queue
Следующее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: Fix overflow of bgwriter's request queue