Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e1fae1

Browse files
author
Amit Kapila
committed
Move parallel vacuum code to vacuumparallel.c.
This commit moves parallel vacuum related code to a new filecommands/vacuumparallel.c so that any table AM supporting indexes canutilize parallel vacuum in order to call index AM callbacks (ambulkdeleteand amvacuumcleanup) with parallel workers.Another reason for this refactoring is that the parallel vacuum isn'tspecific to heap so it doesn't make sense to keep this code inheap/vacuumlazy.c.Author: Masahiko Sawada, based on suggestion from Andres FreundReviewed-by: Hou Zhijie, Amit Kapila, Haiying TangDiscussion:https://www.postgresql.org/message-id/20211030212101.ae3qcouatwmy7tbr%40alap3.anarazel.de
1 parente2e1bbd commit8e1fae1

File tree

8 files changed

+1125
-983
lines changed

8 files changed

+1125
-983
lines changed

‎src/backend/access/heap/vacuumlazy.c

Lines changed: 28 additions & 974 deletions
Large diffs are not rendered by default.

‎src/backend/access/transam/parallel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include"postgres.h"
1616

17-
#include"access/heapam.h"
1817
#include"access/nbtree.h"
1918
#include"access/parallel.h"
2019
#include"access/session.h"
@@ -25,6 +24,7 @@
2524
#include"catalog/pg_enum.h"
2625
#include"catalog/storage.h"
2726
#include"commands/async.h"
27+
#include"commands/vacuum.h"
2828
#include"executor/execParallel.h"
2929
#include"libpq/libpq.h"
3030
#include"libpq/pqformat.h"

‎src/backend/commands/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ OBJS = \
5959
typecmds.o\
6060
user.o\
6161
vacuum.o\
62+
vacuumparallel.o\
6263
variable.o\
6364
view.o
6465

‎src/backend/commands/vacuum.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
* commands, (b) code to compute various vacuum thresholds, and (c) index
88
* vacuum code.
99
*
10-
* VACUUM for heap AM is implemented in vacuumlazy.c, ANALYZE in analyze.c, and
11-
* VACUUM FULL is a variant of CLUSTER, handled in cluster.c.
10+
* VACUUM for heap AM is implemented in vacuumlazy.c, parallel vacuum in
11+
* vacuumparallel.c, ANALYZE in analyze.c, and VACUUM FULL is a variant of
12+
* CLUSTER, handled in cluster.c.
1213
*
1314
*
1415
* Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp