mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01:00
Assorted trivial cleanup of c5c239e26e
c5c239e26e 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().
This commit is contained in:
parent
7fe312f609
commit
3f850c3fc5
|
|
@ -30,6 +30,7 @@
|
|||
#include "storage/indexfsm.h"
|
||||
#include "storage/ipc.h"
|
||||
#include "storage/lmgr.h"
|
||||
#include "storage/read_stream.h"
|
||||
#include "utils/fmgrprotos.h"
|
||||
#include "utils/index_selfuncs.h"
|
||||
#include "utils/memutils.h"
|
||||
|
|
@ -1072,8 +1073,6 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
|||
0);
|
||||
for (;;)
|
||||
{
|
||||
Buffer buf;
|
||||
|
||||
/* Get the current relation length */
|
||||
if (needLock)
|
||||
LockRelationForExtension(rel, ExclusiveLock);
|
||||
|
|
@ -1089,13 +1088,13 @@ btvacuumscan(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
|
|||
if (p.current_blocknum >= num_pages)
|
||||
break;
|
||||
|
||||
|
||||
p.last_exclusive = num_pages;
|
||||
|
||||
/* Iterate over pages, then loop back to recheck relation length */
|
||||
while (true)
|
||||
{
|
||||
BlockNumber current_block;
|
||||
Buffer buf;
|
||||
|
||||
/* call vacuum_delay_point while not holding any buffer lock */
|
||||
vacuum_delay_point(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user