1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Fix description of WAL record blocks in hash_xlog.h

hash_xlog.h included descriptions for the blocks used in WAL records
that were was not completely consistent with how the records are
generated, with one block missing for SQUEEZE_PAGE, and inconsistent
descriptions used for block 0 in VACUUM_ONE_PAGE and MOVE_PAGE_CONTENTS.

This information was incorrect since c11453ce0a, cross-checking the
logic for the record generation.

Author: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/CALdSSPj1j=a1d1hVA3oabRFz0hSU3KKrYtZPijw4UPUM7LY9zw@mail.gmail.com
Backpatch-through: 13
This commit is contained in:
Michael Paquier
2025-09-11 17:17:32 +09:00
parent 5eab9b0a47
commit 5e131489fe

View File

@@ -129,7 +129,7 @@ typedef struct xl_hash_split_complete
* *
* This data record is used for XLOG_HASH_MOVE_PAGE_CONTENTS * This data record is used for XLOG_HASH_MOVE_PAGE_CONTENTS
* *
* Backup Blk 0: bucket page * Backup Blk 0: primary bucket page
* Backup Blk 1: page containing moved tuples * Backup Blk 1: page containing moved tuples
* Backup Blk 2: page from which tuples will be removed * Backup Blk 2: page from which tuples will be removed
*/ */
@@ -149,12 +149,13 @@ typedef struct xl_hash_move_page_contents
* *
* This data record is used for XLOG_HASH_SQUEEZE_PAGE * This data record is used for XLOG_HASH_SQUEEZE_PAGE
* *
* Backup Blk 0: page containing tuples moved from freed overflow page * Backup Blk 0: primary bucket page
* Backup Blk 1: freed overflow page * Backup Blk 1: page containing tuples moved from freed overflow page
* Backup Blk 2: page previous to the freed overflow page * Backup Blk 2: freed overflow page
* Backup Blk 3: page next to the freed overflow page * Backup Blk 3: page previous to the freed overflow page
* Backup Blk 4: bitmap page containing info of freed overflow page * Backup Blk 4: page next to the freed overflow page
* Backup Blk 5: meta page * Backup Blk 5: bitmap page containing info of freed overflow page
* Backup Blk 6: meta page
*/ */
typedef struct xl_hash_squeeze_page typedef struct xl_hash_squeeze_page
{ {
@@ -245,7 +246,7 @@ typedef struct xl_hash_init_bitmap_page
* *
* This data record is used for XLOG_HASH_VACUUM_ONE_PAGE * This data record is used for XLOG_HASH_VACUUM_ONE_PAGE
* *
* Backup Blk 0: bucket page * Backup Blk 0: primary bucket page
* Backup Blk 1: meta page * Backup Blk 1: meta page
*/ */
typedef struct xl_hash_vacuum_one_page typedef struct xl_hash_vacuum_one_page