Rename lazy_scan_skip() to heap_vac_scan_next_block() and move more code into the function, so that the caller doesn't need to know about ranges or skipping anymore. heap_vac_scan_next_block() returns the next block to process, and the logic for determining that block is all within the function. This makes the skipping logic easier to understand, as it's all in the same function, and makes the calling code easier to understand as it's less cluttered. The state variables needed to manage the skipping logic are moved to LVRelState. heap_vac_scan_next_block() now manages its own VM buffer separately from the caller's vmbuffer variable. The caller's vmbuffer holds the VM page for the current block its processing, while heap_vac_scan_next_block() keeps a pin on the VM page for the next unskippable block. Most of the time they are the same, so we hold two pins on the same buffer, but it's more convenient to manage them separately. For readability inside heap_vac_scan_next_block(), move the logic of finding the next unskippable block to separate function, and add some comments. This refactoring will also help future patches to switch to using a streaming read interface, and eventually AIO (https://postgr.es/m/CA%2BhUKGJkOiOCa%2Bmag4BF%2BzHo7qo%3Do9CFheB8%3Dg6uT5TUm2gkvA%40mail.gmail.com) Author: Melanie Plageman, Heikki Linnakangas Reviewed-by: Andres Freund (older version) Discussion: https://postgr.es/m/CAAKRu_Yf3gvXGcCnqqfoq0Q8LX8UM-e-qbm_B1LeZh60f8WhWA%40mail.gmail.com |
2 years ago | |
|---|---|---|
| config | Remove AIX support | 2 years ago |
| contrib | Fix deparsing of Consts in postgres_fdw ORDER BY | 2 years ago |
| doc | clusterdb: Allow specifying tables to process in all databases. | 2 years ago |
| src | Confine vacuum skip logic to lazy_scan_skip() | 2 years ago |
| .cirrus.star | Remove duplicate words in docs and code comments. | 2 years ago |
| .cirrus.tasks.yml | ci: Add test coverage of different pg_upgrade modes | 2 years ago |
| .cirrus.yml | ci: Make compute resources for CI configurable | 3 years ago |
| .dir-locals.el | Make Emacs perl-mode indent more like perltidy. | 7 years ago |
| .editorconfig | Add .editorconfig | 6 years ago |
| .git-blame-ignore-revs | Add a few recent commits to .git-blame-ignore-revs. | 2 years ago |
| .gitattributes | Remove non-existing file from .gitattributes | 2 years ago |
| .gitignore | Update top-level .gitignore. | 3 years ago |
| COPYRIGHT | Update copyright for 2024 | 2 years ago |
| GNUmakefile.in | Combine headerscheck and cpluspluscheck scripts | 2 years ago |
| HISTORY | Canonicalize some URLs | 6 years ago |
| Makefile | Remove AIX support | 2 years ago |
| README.md | Convert README to Markdown. | 2 years ago |
| aclocal.m4 | autoconf: Move export_dynamic determination to configure | 3 years ago |
| configure | Add --copy-file-range option to pg_upgrade. | 2 years ago |
| configure.ac | Add --copy-file-range option to pg_upgrade. | 2 years ago |
| meson.build | Add --copy-file-range option to pg_upgrade. | 2 years ago |
| meson_options.txt | Add backend support for injection points | 2 years ago |
README.md
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at:
https://www.postgresql.org/docs/devel/
In particular, information about building PostgreSQL from the source
code can be found at:
https://www.postgresql.org/docs/devel/installation.html
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.