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 dq98d1$1mp$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
"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>
> Yes, the patch is wrong as-is because it may lose uncompleted fsyncs.
> But I think that we could just add the AbsorbFsyncRequests call in the
> fsync loop and not worry about trying to avoid doing extra fsyncs.
>
> Another possibility is to make the copied list as in the patch, but
> HASH_REMOVE an entry only after doing the fsync successfully --- as long
> as you don't AbsorbFsyncRequests between doing the fsync and removing
> the entry, you aren't risking missing a necessary fsync.  I'm
> unconvinced that this is worth the trouble, however.
>

Maybe the take a copied list is safer. I got a little afraid of doing
seqscan hash while doing HASH_ENTER at the same time. Do we have this kind
of hash usage somewhere?

Regards,
Qingqing



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fix overflow of bgwriter's request queue
Next
From: Tom Lane
Date:
Subject: Re: Fix overflow of bgwriter's request queue