Skip site navigation (1) Skip section navigation (2)

Re: Fix overflow of bgwriter's request queue

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Fix overflow of bgwriter's request queue
Date: 2006-01-13 07:52:07
Message-ID: dq7m4q$5nk$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-patches
"ITAGAKI Takahiro" <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp> wrote
>
> 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.
>

I see - it is the AbsorbFsyncRequests() added in mdsync() loop and you want 
to avoid unecessary fsyncs. But the remove-recover method you use has a 
caveat: if any hash_search(HASH_ENTER) failed when you try to reinsert them 
into the pendingOpsTable, you have to raise the error to PANIC since we 
can't get back the missing fds any more.

Regards,
Qingqing



In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2006-01-13 19:44:17
Subject: Re: Index padding optimization
Previous:From: ITAGAKI TakahiroDate: 2006-01-13 07:04:00
Subject: Re: Fix overflow of bgwriter's request queue

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group