pgsql: Only make buffer strategy for vacuum when it's likely needed

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Only make buffer strategy for vacuum when it's likely needed
Date: 2023-04-03 07:20:24
Message-ID: E1pjEUJ-0017Zh-H0@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Only make buffer strategy for vacuum when it's likely needed

VACUUM FULL and VACUUM ONLY_DATABASE_STATS will not use the vacuum
strategy ring created in vacuum(), so don't waste effort making it in
those cases.

There are other conceivable cases where the buffer strategy also won't be
used, but those are probably less common and not worth troubling over too
much. For example VACUUM (PROCESS_MAIN false, PROCESS_TOAST false).
There are other cases too, but many of these are only discovered once
inside vacuum_rel().

Author: Melanie Plageman
Reviewed-by: David Rowley
Discussion: https://postgr.es/m/CAAKRu_ZLRuzkM3zKogiZAz2hUony37yLY4aaLb8fPf8fgqs5Og@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/32fbe0239b03d868744758d5809eaf74f19c924d

Modified Files
--------------
src/backend/commands/vacuum.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-04-03 08:52:56 pgsql: Fix typo in CI README
Previous Message Peter Eisentraut 2023-04-03 05:26:15 pgsql: pg_basebackup: Correct type of WalSegSz