Re: Fix overflow of bgwriter's request queue - Mailing list pgsql-patches

From Qingqing Zhou
Subject Re: Fix overflow of bgwriter's request queue
Date
Msg-id dq7idc$30g7$1@news.hub.org
Whole thread Raw
In response to Fix overflow of bgwriter's request queue  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Responses Re: Fix overflow of bgwriter's request queue
List pgsql-patches
"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



pgsql-patches by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Fix overflow of bgwriter's request queue
Next
From: ITAGAKI Takahiro
Date:
Subject: Re: Fix overflow of bgwriter's request queue