| From: | Nathan Bossart <nathan(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Avoid including vacuum.h in tableam.h and heapam.h. |
| Date: | 2026-03-31 17:44:31 |
| Message-ID: | E1w7d8g-002LDE-2i@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)anarazel(dot)de>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2026-03-31 18:49:28 | pgsql: sasl: Allow backend mechanisms to "abandon" exchanges |
| Previous Message | Tom Lane | 2026-03-31 15:49:59 | pgsql: Doc: remove bogus claim that tsvectors can have up to 2^64 entri |