Melanie Plageman 052026c9b9 Eagerly scan all-visible pages to amortize aggressive vacuum
Aggressive vacuums must scan every unfrozen tuple in order to advance
the relfrozenxid/relminmxid. Because data is often vacuumed before it is
old enough to require freezing, relations may build up a large backlog
of pages that are set all-visible but not all-frozen in the visibility
map. When an aggressive vacuum is triggered, all of these pages must be
scanned. These pages have often been evicted from shared buffers and
even from the kernel buffer cache. Thus, aggressive vacuums often incur
large amounts of extra I/O at the expense of foreground workloads.

To amortize the cost of aggressive vacuums, eagerly scan some
all-visible but not all-frozen pages during normal vacuums.

All-visible pages that are eagerly scanned and set all-frozen in the
visibility map are counted as successful eager freezes and those not
frozen are counted as failed eager freezes.

If too many eager scans fail in a row, eager scanning is temporarily
suspended until a later portion of the relation. The number of failures
tolerated is configurable globally and per table.

To effectively amortize aggressive vacuums, we cap the number of
successes as well. Capping eager freeze successes also limits the amount
of potentially wasted work if these pages are modified again before the
next aggressive vacuum. Once we reach the maximum number of blocks
successfully eager frozen, eager scanning is disabled for the remainder
of the vacuum of the relation.

Original design idea from Robert Haas, with enhancements from
Andres Freund, Tomas Vondra, and me

Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Robert Treat <rob@xzilla.net>
Reviewed-by: Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/flat/CAAKRu_ZF_KCzZuOrPrOqjGVe8iRVWEAJSpzMgRQs%3D5-v84cXUg%40mail.gmail.com
2025-02-11 13:53:48 -05:00
..
2025-02-07 09:46:59 +01:00
2024-12-02 13:30:07 -06:00
2024-10-14 17:22:02 -07:00
2025-02-07 09:46:59 +01:00
2024-02-28 15:17:23 +04:00
2024-10-14 17:22:02 -07:00
2025-01-25 00:12:30 -08:00
2025-02-05 13:58:40 +01:00
2025-01-01 11:21:55 -05:00
2025-01-01 11:21:55 -05:00
2025-01-01 11:21:55 -05:00
2023-10-25 09:40:55 +09:00
2024-12-02 13:30:07 -06:00
2024-03-17 13:58:59 +00:00
2025-01-24 12:39:47 +01:00
2024-07-01 07:56:10 +09:00
2024-03-17 13:58:59 +00:00
2025-01-24 12:39:47 +01:00
2023-11-06 15:18:04 +01:00
2023-04-13 10:16:33 +02:00
2025-01-01 11:21:55 -05:00
2025-02-07 09:46:59 +01:00

<!-- doc/src/sgml/README.non-ASCII -->

Representation of non-ASCII characters
--------------------------------------

Find non-ASCII characters using:

        grep --recursive --color='auto' -P '[\x80-\xFF]' .

Convert to HTML4 named entity (&) escapes
-----------------------------------------

We support several output formats:

*  html (supports all Unicode characters)
*  man (supports all Unicode characters)
*  pdf (supports only Latin-1 characters)
*  info

While some output formatting tools support all Unicode characters,
others only support Latin-1 characters.  Specifically, the PDF rendering
engine can only display Latin-1 characters;  non-Latin-1 Unicode
characters are displayed as "###".

Therefore, in the SGML files, we only use Latin-1 characters.  We
typically encode these characters as HTML entities, e.g., &Aacute;lvaro.
It is also possible to safely represent Latin-1 characters in UTF8
encoding for all output formats.

Do not use UTF numeric character escapes (&#nnn;).

HTML entities
        official:      http://www.w3.org/TR/html4/sgml/entities.html
        one page:      http://www.zipcon.net/~swhite/docs/computers/browsers/entities_page.html
        other lists:   http://www.zipcon.net/~swhite/docs/computers/browsers/entities.html
                       http://www.zipcon.net/~swhite/docs/computers/browsers/entities_page.html
                       https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references