Avoid including vacuum.h in tableam.h and heapam.h.
Commit 2252fcd427 modified some function prototypes in tableam.h
and heapam.h to take a VacuumParams argument instead of a pointer,
which required including vacuum.h in those headers. vacuum.h has a
reasonably large dependency tree, and headers like tableam.h are
widely included, so this is not ideal. To fix, change the
functions in question to accept a "const VacuumParams *" argument
instead. That allows us to use a forward declaration for
VacuumParams and avoid including vacuum.h. Since vacuum_rel()
needs to scribble on the params argument, we still pass it by value
to that function so that the original struct is not modified.
Reported-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/rzxpxod4c4la62yvutyrvgoyilrl2fx55djaf2suidy7np5m6c%403l2ln476eadh
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/771fe0948cad0acf883f15026c718d4f6942c8cb
Modified Files
--------------
contrib/dblink/dblink.c | 1 +
contrib/tablefunc/tablefunc.c | 1 +
src/backend/access/heap/vacuumlazy.c | 46 +++++++++++++++---------------
src/backend/catalog/toasting.c | 1 +
src/backend/commands/analyze.c | 26 ++++++++---------
src/backend/commands/cluster.c | 4 +--
src/backend/commands/event_trigger.c | 1 +
src/backend/commands/vacuum.c | 40 +++++++++++++-------------
src/backend/postmaster/autovacuum.c | 2 +-
src/backend/replication/logical/conflict.c | 1 +
src/backend/replication/logical/worker.c | 1 +
src/backend/utils/adt/ri_triggers.c | 2 ++
src/include/access/heapam.h | 12 ++++----
src/include/access/tableam.h | 7 +++--
src/include/commands/vacuum.h | 6 ++--
src/pl/tcl/pltcl.c | 1 +
src/tools/pgindent/typedefs.list | 1 +
17 files changed, 82 insertions(+), 71 deletions(-)