Re: hio.c does visibilitymap_pin()/IO while holding buffer lock
От | Andres Freund |
---|---|
Тема | Re: hio.c does visibilitymap_pin()/IO while holding buffer lock |
Дата | |
Msg-id | 20230402224024.aealekgu2df4cnhs@awork3.anarazel.de обсуждение исходный текст |
Ответ на | Re: hio.c does visibilitymap_pin()/IO while holding buffer lock (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: hio.c does visibilitymap_pin()/IO while holding buffer lock
|
Список | pgsql-hackers |
Hi, On 2023-03-28 19:17:21 -0700, Andres Freund wrote: > On 2023-03-28 18:21:02 -0700, Andres Freund wrote: > > Here's a draft patch. > > Attached is v2, with a stupid bug fixed and a bit of comment / pgindent > polish. I'd welcome some review (Tomas?), but otherwise I'm planning to push ahead with this. I'm still debating with myself whether this commit (or a prerequisite commit) should move logic dealing with the buffer ordering into GetVisibilityMapPins(), so we don't need two blocks like this: if (otherBuffer == InvalidBuffer || targetBlock <= otherBlock) GetVisibilityMapPins(relation, buffer, otherBuffer, targetBlock, otherBlock, vmbuffer, vmbuffer_other); else GetVisibilityMapPins(relation, otherBuffer, buffer, otherBlock, targetBlock, vmbuffer_other, vmbuffer); ... if (otherBuffer != InvalidBuffer) { if (GetVisibilityMapPins(relation, otherBuffer, buffer, otherBlock, targetBlock, vmbuffer_other, vmbuffer)) unlockedTargetBuffer = true; } else { if (GetVisibilityMapPins(relation, buffer, InvalidBuffer, targetBlock, InvalidBlockNumber, vmbuffer, InvalidBuffer)) unlockedTargetBuffer = true; } } Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: