pgsql: Make vacuum failsafe_active globally visible

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make vacuum failsafe_active globally visible
Date: 2023-04-06 23:03:23
Message-ID: E1pkYdW-001kmn-27@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Reviewed-by: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Reviewed-by: Robert Haas <robertmhaas(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/CAAKRu_ZngzqnEODc7LmS1NH04Kt6Y9huSjz5pp7%2BDXhrjDA0gw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/71a825194fd3f8c084f63bd2b0a8d11d753d25d3

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 16 +++++++---------
src/backend/commands/vacuum.c | 15 +++++++++++++++
src/include/commands/vacuum.h | 1 +
3 files changed, 23 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2023-04-06 23:20:20 pgsql: heapam: Pass number of required pages to RelationGetBufferForTup
Previous Message Tom Lane 2023-04-06 22:14:37 pgsql: Stabilize just-added regression test cases.