Re: Fix mdsync never-ending loop problem

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Fix mdsync never-ending loop problem
Дата
Msg-id 4615235B.9040204@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Fix mdsync never-ending loop problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Fix mdsync never-ending loop problem
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Load distributed checkpoint V3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Fix mdsync never-ending loop problem