Move parallel vacuum code to vacuumparallel.c.
authorAmit Kapila <akapila@postgresql.org>
Thu, 23 Dec 2021 06:12:52 +0000 (11:42 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 23 Dec 2021 06:12:52 +0000 (11:42 +0530)
commit8e1fae193864527c931a704bd7908e4fbc983f5c
tree50f33193006724e680e7cd87f440f86050dded43
parente2e1bbde46a3509c3b7e830196f4314242925247
Move parallel vacuum code to vacuumparallel.c.

This commit moves parallel vacuum related code to a new file
commands/vacuumparallel.c so that any table AM supporting indexes can
utilize parallel vacuum in order to call index AM callbacks (ambulkdelete
and amvacuumcleanup) with parallel workers.

Another reason for this refactoring is that the parallel vacuum isn't
specific to heap so it doesn't make sense to keep this code in
heap/vacuumlazy.c.

Author: Masahiko Sawada, based on suggestion from Andres Freund
Reviewed-by: Hou Zhijie, Amit Kapila, Haiying Tang
Discussion: https://www.postgresql.org/message-id/20211030212101.ae3qcouatwmy7tbr%40alap3.anarazel.de
src/backend/access/heap/vacuumlazy.c
src/backend/access/transam/parallel.c
src/backend/commands/Makefile
src/backend/commands/vacuum.c
src/backend/commands/vacuumparallel.c [new file with mode: 0644]
src/include/access/heapam.h
src/include/commands/vacuum.h
src/tools/pgindent/typedefs.list