June 2024
Intermediate to advanced
456 pages
11h 34m
English
As you learned earlier, PostgreSQL stores data in pages that are 8 KB in size by default. The pages are not completely filled; space is left available to store new tuples from row modifications. Dead tuples take up space in those pages. PostgreSQL also considers unused free space part of what makes up bloat.[232]
When you want to make sure row visibility is updated and space from dead tuples is reclaimed, you can perform a manual VACUUM operation. Optionally, include the ANALYZE keyword to update table statistics at the same time. Try that out by running the following from psql:
| | VACUUM (ANALYZE, VERBOSE) users; |
New versions of PostgreSQL continue to add capabilities to Vacuum and Analyze. Version ...
Read now
Unlock full access