Skip to content

Commit 009dbde

Browse files
committed
Run pgindent on heapam.c
An upcoming patch by Melanie Plageman does some refactoring work in this area. Run pgindent on that file now before making any changes so that it's easier to maintain/evolve each of the individual patches doing the refactor work. Additionally, add a few new required typedefs to the list to make it easier to do future pgindent runs on this file during the refactor work. Discussion: https://postgr.es/m/CAAKRu_YSOnhKsDyFcqJsKtBSrd32DP-jjXmv7hL0BPD-z0TGXQ@mail.gmail.com
1 parent 236f1ea commit 009dbde

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/backend/access/heap/heapam.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -561,15 +561,15 @@ heapgettup(HeapScanDesc scan,
561561
}
562562
}
563563
else
564-
block = scan->rs_startblock; /* first page */
564+
block = scan->rs_startblock; /* first page */
565565
heapgetpage((TableScanDesc) scan, block);
566566
lineoff = FirstOffsetNumber; /* first offnum */
567567
scan->rs_inited = true;
568568
}
569569
else
570570
{
571571
/* continue from previously returned page/tuple */
572-
block = scan->rs_cblock; /* current page */
572+
block = scan->rs_cblock; /* current page */
573573
lineoff = /* next offnum */
574574
OffsetNumberNext(ItemPointerGetOffsetNumber(&(tuple->t_self)));
575575
}
@@ -623,7 +623,7 @@ heapgettup(HeapScanDesc scan,
623623
else
624624
{
625625
/* continue from previously returned page/tuple */
626-
block = scan->rs_cblock; /* current page */
626+
block = scan->rs_cblock; /* current page */
627627
}
628628

629629
LockBuffer(scan->rs_cbuf, BUFFER_LOCK_SHARE);
@@ -769,7 +769,7 @@ heapgettup(HeapScanDesc scan,
769769
scan->rs_parallelworkerdata;
770770

771771
block = table_block_parallelscan_nextpage(scan->rs_base.rs_rd,
772-
pbscanwork, pbscan);
772+
pbscanwork, pbscan);
773773
finished = (block == InvalidBlockNumber);
774774
}
775775
else
@@ -899,15 +899,15 @@ heapgettup_pagemode(HeapScanDesc scan,
899899
}
900900
}
901901
else
902-
block = scan->rs_startblock; /* first page */
902+
block = scan->rs_startblock; /* first page */
903903
heapgetpage((TableScanDesc) scan, block);
904904
lineindex = 0;
905905
scan->rs_inited = true;
906906
}
907907
else
908908
{
909909
/* continue from previously returned page/tuple */
910-
block = scan->rs_cblock; /* current page */
910+
block = scan->rs_cblock; /* current page */
911911
lineindex = scan->rs_cindex + 1;
912912
}
913913

@@ -958,7 +958,7 @@ heapgettup_pagemode(HeapScanDesc scan,
958958
else
959959
{
960960
/* continue from previously returned page/tuple */
961-
block = scan->rs_cblock; /* current page */
961+
block = scan->rs_cblock; /* current page */
962962
}
963963

964964
page = BufferGetPage(scan->rs_cbuf);
@@ -1078,7 +1078,7 @@ heapgettup_pagemode(HeapScanDesc scan,
10781078
scan->rs_parallelworkerdata;
10791079

10801080
block = table_block_parallelscan_nextpage(scan->rs_base.rs_rd,
1081-
pbscanwork, pbscan);
1081+
pbscanwork, pbscan);
10821082
finished = (block == InvalidBlockNumber);
10831083
}
10841084
else
@@ -2722,6 +2722,7 @@ heap_delete(Relation relation, ItemPointer tid,
27222722
tp.t_self = *tid;
27232723

27242724
l1:
2725+
27252726
/*
27262727
* If we didn't pin the visibility map page and the page has become all
27272728
* visible while we were busy locking the buffer, we'll have to unlock and

src/tools/pgindent/typedefs.list

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,11 +1090,13 @@ HeadlineJsonState
10901090
HeadlineParsedText
10911091
HeadlineWordEntry
10921092
HeapCheckContext
1093+
HeapPageFreeze
10931094
HeapScanDesc
10941095
HeapTuple
10951096
HeapTupleData
10961097
HeapTupleFields
10971098
HeapTupleForceOption
1099+
HeapTupleFreeze
10981100
HeapTupleHeader
10991101
HeapTupleHeaderData
11001102
HeapTupleTableSlot
@@ -3838,6 +3840,7 @@ xl_hash_vacuum_one_page
38383840
xl_heap_confirm
38393841
xl_heap_delete
38403842
xl_heap_freeze_page
3843+
xl_heap_freeze_plan
38413844
xl_heap_freeze_tuple
38423845
xl_heap_header
38433846
xl_heap_inplace

0 commit comments

Comments
 (0)