Re: Fix mdsync never-ending loop problem

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Fix mdsync never-ending loop problem
Date: 2007-04-05 16:27:07
Message-ID: 4615235B.9040204@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Heikki Linnakangas <heikki(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Schiltknecht 2007-04-05 16:29:27 Re: Auto Partitioning
Previous Message Tom Lane 2007-04-05 16:25:49 Re: Load distributed checkpoint V3

Browse pgsql-patches by date

  From Date Subject
Next Message Markus Schiltknecht 2007-04-05 16:29:27 Re: Auto Partitioning
Previous Message Tom Lane 2007-04-05 16:25:49 Re: Load distributed checkpoint V3