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

From Heikki Linnakangas
Subject Re: Fix mdsync never-ending loop problem
Date
Msg-id 4615235B.9040204@enterprisedb.com
Whole thread Raw
In response to Re: Fix mdsync never-ending loop problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fix mdsync never-ending loop problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Heikki Linnakangas <heikki@enterprisedb.com> writes:
>> Here's a fix for the problem that on a busy system, mdsync never
>> finishes. See the original problem description on hackers:
>
> This leaks memory, no?  (list_delete_cell only deletes the ListCell.)

Oh, I just spotted another problem with it and posted an updated patch,
but I missed that.

> But I dislike copying the table entries anyway, see comment on -hackers.

Frankly the cycle id idea sounds more ugly and fragile to me. You'll
need to do multiple scans of the hash table that way, starting from top
every time you call AbsorbFsyncRequests (like we do know). But whatever...

> BTW, it's very hard to see what a patch like this is actually changing.
> It might be better to submit a version that doesn't reindent the chunks
> of code you aren't changing, so as to reduce the visual size of the
> diff.  A note to the committer to reindent the whole function is
> sufficient (or if he forgets, pg_indent will fix it eventually).

Ok, will do that. Or would you like to just take over from here?

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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Load distributed checkpoint V3
Next
From: Tom Lane
Date:
Subject: Re: Fix mdsync never-ending loop problem