mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Calculate the insert threshold for triggering an autovacuum of a
relation based on the number of unfrozen pages.
By only considering the unfrozen portion of the table when calculating
how many tuples to add to the insert threshold, we can trigger more
frequent vacuums of insert-heavy tables. This increases the chances of
vacuuming those pages when they still reside in shared buffers
This also increases the number of autovacuums triggered by tuples
inserted and not by wraparound risk. We prefer to freeze these pages
during insert-triggered autovacuums, as anti-wraparound vacuums are not
automatically canceled by conflicting lock requests.
We calculate the unfrozen percentage of the table using the recently
added (99f8f3fbbc
) relallfrozen column of pg_class.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Greg Sabino Mullane <htamfids@gmail.com>
Reviewed-by: Robert Treat <rob@xzilla.net>
Reviewed-by: wenhui qiu <qiuwenhuifx@gmail.com>
Discussion: https://postgr.es/m/flat/CAAKRu_aj-P7YyBz_cPNwztz6ohP%2BvWis%3Diz3YcomkB3NpYA--w%40mail.gmail.com
<!-- 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., Á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