From: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Fix overflow of bgwriter's request queue |
Date: | 2006-01-13 07:04:00 |
Message-ID: | 20060113155017.4E2E.ITAGAKI.TAKAHIRO@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
"Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Qingqing Zhou | 2006-01-13 07:52:07 | Re: Fix overflow of bgwriter's request queue |
Previous Message | Qingqing Zhou | 2006-01-13 06:48:24 | Re: Fix overflow of bgwriter's request queue |