Hi hackers! While doing some xlog-related task at my job I noticed inconsistency between [0] & [1]. hash_xlog.h xl_hash_squeeze_page structure description mismatches with actual code. PFA fixing issue. I also allowed myself to standardise description of xl_hash_move_page_contents and xl_hash_init_bitmap_page, so xl_hash_delete, xl_hash_init_bitmap_page and xl_hash_move_page_contents describes their zeroth backup block akin to each other. [0] https://git.postgresql.org/cgit/postgresql.git/tree/src/include/access/hash_xlog.h?id=567d27e8e2b752743626eb259ba75ecdc936eaf3#n147 [1] https://git.postgresql.org/cgit/postgresql.git/tree/src/backend/access/hash/hash_xlog.c?id=567d27e8e2b752743626eb259ba75ecdc936eaf3#n830 -- Best regards, Kirill Reshke
On Fri, 5 Sept 2025 at 11:17, I wrote: > I also allowed myself to standardise description of > xl_hash_move_page_contents and xl_hash_init_bitmap_page, so > xl_hash_delete, xl_hash_init_bitmap_page and > xl_hash_move_page_contents describes their zeroth backup block akin to > each other. Ahh... sorry for the noise, this part is wrong. PFA v2 -- Best regards, Kirill Reshke
On Sep 5, 2025, at 14:24, Kirill Reshke <reshkekirill@gmail.com> wrote:--
Best regards,
Kirill Reshke
<v2-0001-Fix-comments-in-xlog.h.patch>
On Sep 5, 2025, at 16:29, Chao Li <li.evan.chao@gmail.com> wrote:On Sep 5, 2025, at 14:24, Kirill Reshke <reshkekirill@gmail.com> wrote:--
Best regards,
Kirill Reshke
<v2-0001-Fix-comments-in-xlog.h.patch>LGTM. SlruRecentlyUsed() is now an inline function.
> On 5 Sep 2025, at 11:24, Kirill Reshke <reshkekirill@gmail.com> wrote: > > PFA v2 Proposed change is correct and in line with a description of e.g. XLOG_HASH_MOVE_PAGE_CONTENTS. I'd note that block is for lock only and record does not include image, but other such cases are not reported in comments. Best regards, Andrey Borodin.
On Wed, Sep 10, 2025 at 05:36:48PM +0500, Andrey Borodin wrote: > Proposed change is correct and in line with a description of > e.g. XLOG_HASH_MOVE_PAGE_CONTENTS. > I'd note that block is for lock only and record does not include > image, but other such cases are not reported in comments. Right, the case of block 0 being registered in a MOVE_PAGE_CONTENTS record to ensure that a cleanup lock is taken is documented in _hash_squeezebucket()@hashovfl.c, for SQUEEZE_PAGE, or for DELETE. Squeeze can also do that for buffer 1. On top of your suggestions, I have double-checked the rest of the hash records, and they seem to be in line with hash_xlog.h. Will fix, thanks. -- Michael
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера