pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move parallel vacuum code to vacuumparallel.c.
Date: Thu, 23 Dec 2021 06:20:00 +0000
Message-ID: <E1n0HSK-00048l-RE@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8e1fae193864527c931a704bd7908e4fbc983f5c

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c  | 1002 +------------------------------
src/backend/access/transam/parallel.c |    2 +-
src/backend/commands/Makefile         |    1 +
src/backend/commands/vacuum.c         |    5 +-
src/backend/commands/vacuumparallel.c | 1068 +++++++++++++++++++++++++++++++++
src/include/access/heapam.h           |    1 -
src/include/commands/vacuum.h         |   20 +
src/tools/pgindent/typedefs.list      |    9 +-
8 files changed, 1125 insertions(+), 983 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1n0HSK-00048l-RE@gemulon.postgresql.org>
Permalink:  ../E1n0HSK-00048l-RE@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1n0HSK-00048l-RE@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org
  Subject: Re: pgsql: Move parallel vacuum code to vacuumparallel.c.
  In-Reply-To: <E1n0HSK-00048l-RE@gemulon.postgresql.org>
  References: <E1n0HSK-00048l-RE@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox