"ITAGAKI Takahiro" <itagaki.takahiro@lab.ntt.co.jp> wrote
>
> Attached is a patch that fixes overflow of bgwriter's file-fsync request
> queue.
>
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?
Regards,
Qingqing