mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
amcheck: Remove unused GinScanItem->parentlsn field
The field was introduced by commit 14ffaece0f
, but is unused and
unnecessary. So remove it.
Issues reported by Arseniy Mukhin, along with a proposed patch. Review
by Andrey M. Borodin, cleanup and minor improvements by me.
Author: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>
Reviewed-by: Andrey M. Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/CAE7r3MJ611B9TE=YqBBncewp7-k64VWs+sjk7XF6fJUX77uFBA@mail.gmail.com
This commit is contained in:
@ -38,7 +38,6 @@ typedef struct GinScanItem
|
|||||||
int depth;
|
int depth;
|
||||||
IndexTuple parenttup;
|
IndexTuple parenttup;
|
||||||
BlockNumber parentblk;
|
BlockNumber parentblk;
|
||||||
XLogRecPtr parentlsn;
|
|
||||||
BlockNumber blkno;
|
BlockNumber blkno;
|
||||||
struct GinScanItem *next;
|
struct GinScanItem *next;
|
||||||
} GinScanItem;
|
} GinScanItem;
|
||||||
@ -421,7 +420,6 @@ gin_check_parent_keys_consistency(Relation rel,
|
|||||||
stack->depth = 0;
|
stack->depth = 0;
|
||||||
stack->parenttup = NULL;
|
stack->parenttup = NULL;
|
||||||
stack->parentblk = InvalidBlockNumber;
|
stack->parentblk = InvalidBlockNumber;
|
||||||
stack->parentlsn = InvalidXLogRecPtr;
|
|
||||||
stack->blkno = GIN_ROOT_BLKNO;
|
stack->blkno = GIN_ROOT_BLKNO;
|
||||||
|
|
||||||
while (stack)
|
while (stack)
|
||||||
@ -432,7 +430,6 @@ gin_check_parent_keys_consistency(Relation rel,
|
|||||||
OffsetNumber i,
|
OffsetNumber i,
|
||||||
maxoff,
|
maxoff,
|
||||||
prev_attnum;
|
prev_attnum;
|
||||||
XLogRecPtr lsn;
|
|
||||||
IndexTuple prev_tuple;
|
IndexTuple prev_tuple;
|
||||||
BlockNumber rightlink;
|
BlockNumber rightlink;
|
||||||
|
|
||||||
@ -442,7 +439,6 @@ gin_check_parent_keys_consistency(Relation rel,
|
|||||||
RBM_NORMAL, strategy);
|
RBM_NORMAL, strategy);
|
||||||
LockBuffer(buffer, GIN_SHARE);
|
LockBuffer(buffer, GIN_SHARE);
|
||||||
page = (Page) BufferGetPage(buffer);
|
page = (Page) BufferGetPage(buffer);
|
||||||
lsn = BufferGetLSNAtomic(buffer);
|
|
||||||
maxoff = PageGetMaxOffsetNumber(page);
|
maxoff = PageGetMaxOffsetNumber(page);
|
||||||
rightlink = GinPageGetOpaque(page)->rightlink;
|
rightlink = GinPageGetOpaque(page)->rightlink;
|
||||||
|
|
||||||
@ -484,7 +480,6 @@ gin_check_parent_keys_consistency(Relation rel,
|
|||||||
ptr->depth = stack->depth;
|
ptr->depth = stack->depth;
|
||||||
ptr->parenttup = CopyIndexTuple(stack->parenttup);
|
ptr->parenttup = CopyIndexTuple(stack->parenttup);
|
||||||
ptr->parentblk = stack->parentblk;
|
ptr->parentblk = stack->parentblk;
|
||||||
ptr->parentlsn = stack->parentlsn;
|
|
||||||
ptr->blkno = rightlink;
|
ptr->blkno = rightlink;
|
||||||
ptr->next = stack->next;
|
ptr->next = stack->next;
|
||||||
stack->next = ptr;
|
stack->next = ptr;
|
||||||
@ -614,7 +609,6 @@ gin_check_parent_keys_consistency(Relation rel,
|
|||||||
ptr->parenttup = NULL;
|
ptr->parenttup = NULL;
|
||||||
ptr->parentblk = stack->blkno;
|
ptr->parentblk = stack->blkno;
|
||||||
ptr->blkno = GinGetDownlink(idxtuple);
|
ptr->blkno = GinGetDownlink(idxtuple);
|
||||||
ptr->parentlsn = lsn;
|
|
||||||
ptr->next = stack->next;
|
ptr->next = stack->next;
|
||||||
stack->next = ptr;
|
stack->next = ptr;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user