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

From Tom Lane
Subject Re: Fix mdsync never-ending loop problem
Date
Msg-id 28872.1175792912@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix mdsync never-ending loop problem  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-patches
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> I think the failure handling is correct in the "to-do list" approach,
> when an entry is read from the list, it's checked that the entry hasn't
> been removed from the hash table. Actually there was a bug in the
> original LDC patch in the failure handling: it replaced the per-entry
> failures-counter with a local retry_counter variable, but it wasn't
> cleared after a successful write which would lead to bogus ERRORs when
> multiple relations are dropped during the mdsync. I kept the original
> per-entry counter, though the local variable approach could be made to work.

Yeah.  One of the things that bothered me about the patch was that it
would be easy to mess up by updating state in the copied entry instead
of the "real" info in the hashtable.  It would be clearer what's
happening if the to-do list contains only the lookup keys and not the
whole struct.

            regards, tom lane

pgsql-patches by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Fix mdsync never-ending loop problem
Next
From: "Simon Riggs"
Date:
Subject: Re: Fix mdsync never-ending loop problem