diff options
| author | Daniel Gustafsson | 2023-04-06 22:54:08 +0000 |
|---|---|---|
| committer | Daniel Gustafsson | 2023-04-06 22:54:08 +0000 |
| commit | 71a825194fd3f8c084f63bd2b0a8d11d753d25d3 (patch) | |
| tree | 765b0e8695933862f5e23f3e244ead80f8de5325 /src/include/commands | |
| parent | 5499706bdf60235f787eae9d2b541444ef0b31b3 (diff) | |
Make vacuum failsafe_active globally visible
While vacuuming a table in failsafe mode, VacuumCostActive should
not be re-enabled. This currently isn't a problem because vacuum
cost parameters are only refreshed in between vacuuming tables and
failsafe status is reset for every table.
In preparation for allowing vacuum cost parameters to be updated
more frequently, elevate LVRelState->failsafe_active to a global,
VacuumFailsafeActive, which will be checked when determining whether
or not to re-enable vacuum cost-related delays.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAAKRu_ZngzqnEODc7LmS1NH04Kt6Y9huSjz5pp7%2BDXhrjDA0gw%40mail.gmail.com
Diffstat (limited to 'src/include/commands')
| -rw-r--r-- | src/include/commands/vacuum.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 19ca818dc20..1223d15e0db 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -306,6 +306,7 @@ extern PGDLLIMPORT pg_atomic_uint32 *VacuumSharedCostBalance; extern PGDLLIMPORT pg_atomic_uint32 *VacuumActiveNWorkers; extern PGDLLIMPORT int VacuumCostBalanceLocal; +extern PGDLLIMPORT bool VacuumFailsafeActive; /* in commands/vacuum.c */ extern void ExecVacuum(ParseState *pstate, VacuumStmt *vacstmt, bool isTopLevel); |
