postgresql/src
Michael Paquier 4211fbd841 Add PROCESS_MAIN to VACUUM
Disabling this option is useful to run VACUUM (with or without FULL) on
only the toast table of a relation, bypassing the main relation.  This
option is enabled by default.

Running directly VACUUM on a toast table was already possible without
this feature, by using the non-deterministic name of a toast relation
(as of pg_toast.pg_toast_N, where N would be the OID of the parent
relation) in the VACUUM command, and it required a scan of pg_class to
know the name of the toast table.  So this feature is basically a
shortcut to be able to run VACUUM or VACUUM FULL on a toast relation,
using only the name of the parent relation.

A new switch called --no-process-main is added to vacuumdb, to work as
an equivalent of PROCESS_MAIN.

Regression tests are added to cover VACUUM and VACUUM FULL, looking at
pg_stat_all_tables.vacuum_count to see how many vacuums have run on
each table, main or toast.

Author: Nathan Bossart
Reviewed-by: Masahiko Sawada
Discussion: https://postgr.es/m/20221230000028.GA435655@nathanxps13
2023-03-06 16:41:05 +09:00
..
backend Add PROCESS_MAIN to VACUUM 2023-03-06 16:41:05 +09:00
bin Add PROCESS_MAIN to VACUUM 2023-03-06 16:41:05 +09:00
common Revise pg_pwrite_zeros() 2023-03-06 13:21:33 +09:00
fe_utils Revert refactoring of restore command code to shell_restore.c 2023-02-06 08:28:42 +09:00
include Add PROCESS_MAIN to VACUUM 2023-03-06 16:41:05 +09:00
interfaces Check for unbounded authentication exchanges in libpq. 2023-02-22 21:27:38 +02:00
makefiles meson: Add equivalent of configure --disable-rpath option 2023-03-01 08:05:42 +01:00
pl Remove local optimizations of empty Bitmapsets into null pointers. 2023-03-02 12:01:47 -05:00
port Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Add PROCESS_MAIN to VACUUM 2023-03-06 16:41:05 +09:00
timezone Fix outdated references to guc.c 2023-03-02 13:49:39 +01:00
tools Tighten header pre-inclusions in headerscheck and cpluspluscheck. 2023-03-04 12:11:50 -05:00
tutorial Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in autoconf: Move export_dynamic determination to configure 2022-12-06 18:55:28 -08:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00