"Qingqing Zhou" <[EMAIL PROTECTED]> 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



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to