Skip to content

Commit 3f850c3

Browse files
Assorted trivial cleanup of c5c239e
c5c239e made btree vacuum use the read stream API. Though it used functions declared in read_stream.h, it relied on transitively including it. Explicitly include that file. Also remove an extraneous newline and decrease the scope of one of the local variables in btvacuumscan().
1 parent 7fe312f commit 3f850c3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/backend/access/nbtree/nbtree.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "storage/indexfsm.h"
3131
#include "storage/ipc.h"
3232
#include "storage/lmgr.h"
33+
#include "storage/read_stream.h"
3334
#include "utils/fmgrprotos.h"
3435
#include "utils/index_selfuncs.h"
3536
#include "utils/memutils.h"
@@ -1072,8 +1073,6 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
10721073
0);
10731074
for (;;)
10741075
{
1075-
Buffer buf;
1076-
10771076
/* Get the current relation length */
10781077
if (needLock)
10791078
LockRelationForExtension(rel, ExclusiveLock);
@@ -1089,13 +1088,13 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
10891088
if (p.current_blocknum >= num_pages)
10901089
break;
10911090

1092-
10931091
p.last_exclusive = num_pages;
10941092

10951093
/* Iterate over pages, then loop back to recheck relation length */
10961094
while (true)
10971095
{
10981096
BlockNumber current_block;
1097+
Buffer buf;
10991098

11001099
/* call vacuum_delay_point while not holding any buffer lock */
11011100
vacuum_delay_point(false);

0 commit comments

Comments
 (0)