From: | feichanghong <feichanghong(at)qq(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit |
Date: | 2024-01-22 16:21:58 |
Message-ID: | tencent_BEFB72867BA7CF879B492487284296D2F606@qq.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | c | 2024-01-22 16:47:09 | Misleading/inaccurate error message from pg_basebackup |
Previous Message | Heikki Linnakangas | 2024-01-22 16:01:03 | Re: MarkBufferDirty Assert held LW_EXCLUSIVE lock fail when ginFinishSplit |