Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit

Поиск
Список
Период
Сортировка
От feichanghong
Тема Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit
Дата
Msg-id tencent_BEFB72867BA7CF879B492487284296D2F606@qq.com
обсуждение исходный текст
Ответ на Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-bugs

From a performance point of view, this doesn't matter. Incomplete split are extremely rare. For convenience, though, I added a new function specifically for handling these "leftover" incomplete splits as opposed to finishing a split that you just made, which performs the lock-upgrade. See attached. I think that helps with readability, and makes it less likely that we'll forget the lock-upgrade in the future if the insertion code is refactored.
I think that the lock-upgrade in the ginFinishOldSplit function is unsafe
because it violates the requirement of the ginStepRight function that
"The next page is locked first, before releasing the current page.”


Best Regards,
Fei Changhong
Alibaba Cloud Computing Ltd.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit
Следующее
От: c@osss.net
Дата:
Сообщение: Misleading/inaccurate error message from pg_basebackup