Re: [HACKERS] Fix mdsync never-ending loop problem - Mailing list pgsql-patches

From Heikki Linnakangas
Subject Re: [HACKERS] Fix mdsync never-ending loop problem
Date
Msg-id 461C8BFC.6000204@enterprisedb.com
Whole thread Raw
In response to Re: [HACKERS] Fix mdsync never-ending loop problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Fix mdsync never-ending loop problem
List pgsql-patches
Tom Lane wrote:
> I wrote:
>> Actually, on second look I think the key idea here is Takahiro-san's
>> introduction of a cancellation flag in the hashtable entries, to
>> replace the cases where AbsorbFsyncRequests can try to delete entries.
>> What that means is mdsync() doesn't need an outer retry loop at all:
>
> I fooled around with this idea and came up with the attached patch.
> It seems to do what's intended but could do with more eyeballs and
> testing before committing.  Comments please?

I'm traveling today, but I'll take a closer look at it tomorrow morning.
My first thought is that the cycle_ctr just adds extra complexity. The
canceled-flag really is the key in Takahiro-san's patch, so we don't
need the cycle_ctr anymore.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: Table function support
Next
From: "Pavan Deolasee"
Date:
Subject: Re: [HACKERS] CIC and deadlocks