
{"id":8654,"date":"2025-06-25T10:35:45","date_gmt":"2025-06-25T10:35:45","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=8654"},"modified":"2025-06-25T10:35:47","modified_gmt":"2025-06-25T10:35:47","slug":"understanding-postgresql-parameters-tuning-vacuum-parameters-part-2","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/","title":{"rendered":"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters &#8211; Part-2"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I highly recommend starting with <a href=\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-1\/\">Part <\/a>1 of this blog series. In Part 2, we\u2019ll dive into more advanced <code>autovacuum <\/code>parameters, covering <code>memory management<\/code>, <code>freezing <\/code>behaviour, <code>transaction aging<\/code>, and <code>cost-based<\/code> tuning. These settings are key to optimizing PostgreSQL performance, particularly in long-running systems, write-intensive OLTP workloads, and environments where multixact handling is essential.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding and fine-tuning these <code>autovacuum <\/code>Settings can significantly reduce bloat, prevent transaction wraparound risks, and ensure timely cleanup of dead tuples, all while minimizing performance impact on user queries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Autovacuum Resource Management:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1. <code>autovacuum_work_mem<\/code>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>autovacuum_work_mem <\/code>in PostgreSQL specifies the amount of memory allocated to each <code>autovacuum <\/code>worker process for maintenance tasks like <code>vacuuming<\/code>, <code>analyzing <\/code>tables. While autovacuum runs automatically by default to help manage table bloat and statistics, tuning this setting becomes important when working with large datasets. Starting from PostgreSQL 9.4, this parameter can be changed without restarting the server, allowing administrators to optimize performance dynamically as data volume grows.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">To check the current value:<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_work_mem ;\n autovacuum_work_mem \n---------------------\n -1\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>How to set&nbsp;<\/strong><code>autovacuum_work_mem<\/code><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the <code>ALTER SYSTEM<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET autovacuum_work_mem to '1024MB';\nALTER SYSTEM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After changing the setting, reload the PostgreSQL configuration to apply changes without restarting the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# SELECT pg_reload_conf();\n pg_reload_conf \n----------------\n t\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Verifying the Change<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">After reload, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_work_mem ;\n autovacuum_work_mem \n---------------------\n 32MB\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Impact:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Autovacuum <\/code>helps automatically remove dead tuples from tables, preventing table bloat and ensuring efficient database performance. Without <code>autovacuum<\/code> running properly, dead tuples accumulate, which can degrade query speed and increase storage usage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. <code>autovacuum_vacuum_cost_limit<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This parameter controls the <strong>cost threshold<\/strong> that triggers a pause in the <code>autovacuum <\/code>process. When an autovacuum worker exceeds this cost limit, it <strong>sleeps for a duration<\/strong> defined by the <code>autovacuum_vacuum_cost_delay<\/code> parameter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To check the current value:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_vacuum_cost_limit ;\n autovacuum_vacuum_cost_limit \n------------------------------\n -1\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">How to set autovacuum_vacuum_cost_limit<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the <code>ALTER SYSTEM<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET autovacuum_vacuum_cost_limit to 1000;\nALTER SYSTEM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the changes to the PostgreSQL server, reload it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Verifying the Change<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">After reload, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_vacuum_cost_limit;\n autovacuum_vacuum_cost_limit \n------------------------------\n 1000\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Impact:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">This parameter controls how much work a <code>autovacuum <\/code>process can do before it pauses. Setting it to 1000 allows <code>autovacuum <\/code>to process more dead tuples in each cycle, making it more aggressive in cleaning up bloat. The performance impact depends largely on the volume of <code>DELETE <\/code>and <code>UPDATE <\/code>operations on your server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3.<code>autovacuum_vacuum_cost_delay<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This parameter defines the time (in milliseconds) that a <code>autovacuum <\/code>worker pauses between cost-based vacuuming actions. It helps reduce I\/O impact on the system by introducing small delays after a specified cost threshold (controlled by <code>autovacuum_vacuum_cost_limit<\/code>) is exceeded.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">To check the current value :<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_vacuum_cost_delay ;\n autovacuum_vacuum_cost_delay \n------------------------------\n 2ms\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">How to set autovacuum_vacuum_cost_delay<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the <code>ALTER SYSTEM<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET autovacuum_vacuum_cost_delay to'5ms';\nALTER SYSTEM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the changes to the PostgreSQL server, reload it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Verifying the Change<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">After reload, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_vacuum_cost_delay ;\n autovacuum_vacuum_cost_delay \n------------------------------\n 5ms\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Impact:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">This means each <code>autovacuum <\/code>worker pauses for 5 milliseconds after accumulating enough I\/O cost (as defined by <code>autovacuum_vacuum_cost_limit<\/code>). This delay is intended to prevent <code>autovacuum <\/code>from overloading your disk subsystem.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Transaction Aging and Freezing:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1.<code>autovacuum_freeze_max_age<\/code>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>autovacuum_freeze_max_age<\/code> parameter in PostgreSQL sets the maximum age (in transactions) a table&#8217;s data can reach before autovacuum is triggered to perform a freeze operation. This is crucial to prevent transaction ID (XID) wraparound, which can cause data corruption. When the age of a table <code>relfrozenxid<\/code> exceeds this limit (default: 200 million), PostgreSQL starts an autovacuum to freeze old tuples and update relfrozenxid. Setting a higher value reduces the frequency of freeze operations, helping to spread out I\/O load, but if it&#8217;s set too high and autovacuum falls behind, the database could approach the wraparound risk. Therefore, it&#8217;s important to monitor transaction ID age and adjust this parameter based on system activity and performance needs.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">To check the current value :<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_freeze_max_age;\n autovacuum_freeze_max_age \n---------------------------\n 200000000\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>How to set&nbsp;<\/strong>autovacuum_freeze_max_age <\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the <code>ALTER SYSTEM<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET autovacuum_freeze_max_age = 2000000000;\nALTER SYSTEM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the changes to the PostgreSQL server, reload it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Verifying the Change<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">After reload, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_freeze_max_age;\n autovacuum_freeze_max_age \n---------------------------\n 200000000\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Impact:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s not recommended to set it near the maximum unless you have a very large and well-monitored system. A more typical safe value might be in the range of 500 million to 1.5 billion, depending on workload and how effectively <code>autovacuum <\/code>is running.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2.<code>autovacuum_multixact_freeze_max_age<\/code>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>autovacuum_multixact_freeze_max_age<\/code> is a PostgreSQL configuration parameter that controls when autovacuum should freeze multixact IDs to prevent multixact ID wraparound, which can cause data corruption in shared-row scenarios (e.g., when multiple transactions hold locks on the same row).<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">To check the current value :<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_multixact_freeze_max_age ;\n autovacuum_multixact_freeze_max_age \n-------------------------------------\n 400000000\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">How to set autovacuum_multixact_freeze_max_age<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the <code>ALTER SYSTEM<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET autovacuum_multixact_freeze_max_age to '40000001';\nALTER SYSTEM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the changes to the PostgreSQL server, restart it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Verifying the Change<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">After the restart, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show autovacuum_multixact_freeze_max_age;\n autovacuum_multixact_freeze_max_age \n-------------------------------------\n 40000001\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Impact: <\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">This parameter should not be set too low on low-write systems, as infrequent <code>autovacuum <\/code>activity may fail to prevent <code>MultiXID wraparound<\/code>, potentially leading to data corruption. However, setting it too high can cause performance spikes when autovacuum is eventually triggered, especially if multiple tables require freezing simultaneously. The optimal value depends on the workload, so it should be adjusted carefully based on system activity and regular monitoring.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. <code>vacuum_freeze_min_age<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>vacuum_freeze_min_age <\/code>Determines the minimum transaction age at which PostgreSQL will consider a tuple (row version) for <code>freezing <\/code>during <code>vacuum <\/code>operations. In PostgreSQL, <code>tuples <\/code>are tagged with the transaction ID (XID) of the transaction that created them. To avoid XID wraparound (a serious risk in PostgreSQL), old XIDs must eventually be replaced with a special value called FrozenXID, which is safe forever.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">To check the current value :<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show vacuum_freeze_min_age;\n vacuum_freeze_min_age \n-----------------------\n 50000000\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">How to set vacuum_freeze_min_age<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the <code>ALTER SYSTEM<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET vacuum_freeze_min_age to 10000000  ;\nALTER SYSTEM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the changes to the PostgreSQL server, reload it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Verifying the Change<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">After reload, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show vacuum_freeze_min_age;\n vacuum_freeze_min_age \n-----------------------\n 10000000\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Impact:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You should consider changing the value of <code>vacuum_freeze_min_age <\/code>based on your workload. When your server handles heavy write activity, such as frequent <code>INSERT, UPDATE<\/code>, or <code>DELETE <\/code>operations, and <code>autovacuum <\/code>is not running consistently, you may encounter serious issues, including:<br><strong>Table bloat<\/strong>: Dead tuples accumulate and are not cleaned up promptly, leading to inefficient disk usage and slower queries.<br>Critical warnings, such as: &#8220;Database must be vacuumed within X transactions.&#8221;<br>This warning signals that transaction ID wraparound is approaching a critical condition that, if ignored, can lead to data loss or even a forced database shutdown.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Monitoring and Logging:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1. <code>log_autovacuum_min_duration<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This parameter controls <code>autovacuum <\/code>logging based on execution time. When set, it causes autovacuum actions to be written to the PostgreSQL logs only if they run for at least the specified duration (in milliseconds).<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">To check the current value :<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show log_autovacuum_min_duration;\n log_autovacuum_min_duration\n-----------------------------\n -1\n(1 row)\n\npostgres=#<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">How to set autovacuum_naptime<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the <code>ALTER SYSTEM<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET log_autovacuum_min_duration to '5min';\nALTER SYSTEM<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To apply the changes to the PostgreSQL server, reload it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Verifying the Change<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">After reload, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show log_autovacuum_min_duration ;\n log_autovacuum_min_duration \n-----------------------------\n 5min\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Impact :<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Enables better monitoring of <code>autovacuum <\/code>performance, helps identify slow or problematic vacuum processes, and supports more effective tuning of vacuum-related parameters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We explored key PostgreSQL <code>autovacuum <\/code>parameters related to memory usage, <code>vacuum cost control<\/code>, <code>freezing strategies<\/code>, and <code>monitoring<\/code>. These settings are vital for preventing table bloat, performance degradation, and transaction ID wraparound issues.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>autovacuum_work_mem <\/code>and cost-based settings to balance performance and vacuum efficiency. Monitor and adjust freeze-related parameters to avoid catastrophic failures in long-lived systems. Leverage logging to detect inefficiencies early. Properly tuning these parameters, combined with regular monitoring, ensures that PostgreSQL remains robust, efficient, and resilient under growing workloads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: I highly recommend starting with Part 1 of this blog series. In Part 2, we\u2019ll dive into more advanced [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":8663,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[23,42,89,69],"tags":[147,34,29,37,161],"class_list":["post-8654","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql-14","category-postgresql-15","category-postgresql-16","category-vacuuming","tag-autovacuum","tag-dba","tag-performance","tag-postgres","tag-postgresql17"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Understanding PostgreSQL Parameters: Tuning Vacuum Parameters - Part-2 - OpenSource DB<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters - Part-2 - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"Introduction: I highly recommend starting with Part 1 of this blog series. In Part 2, we\u2019ll dive into more advanced [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"OpenSource DB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-25T10:35:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-25T10:35:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"945\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shameer Bhupathi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:site\" content=\"@opensource_db\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shameer Bhupathi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/\"},\"author\":{\"name\":\"Shameer Bhupathi\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\"},\"headline\":\"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters &#8211; Part-2\",\"datePublished\":\"2025-06-25T10:35:45+00:00\",\"dateModified\":\"2025-06-25T10:35:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/\"},\"wordCount\":1132,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png\",\"keywords\":[\"Autovacuum\",\"dba\",\"performance\",\"postgres\",\"Postgresql17\"],\"articleSection\":[\"PostgreSQL 14\",\"PostgreSQL 15\",\"PostgreSQL 16\",\"Vacuuming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/\",\"name\":\"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters - Part-2 - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png\",\"datePublished\":\"2025-06-25T10:35:45+00:00\",\"dateModified\":\"2025-06-25T10:35:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png\",\"width\":1800,\"height\":945,\"caption\":\"CS5\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters &#8211; Part-2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"name\":\"OpenSource DB\",\"description\":\"Your Trusted OpenSource Databases partner\",\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\",\"name\":\"OPENSOURCE DB PRIVATE LIMITED\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png\",\"width\":368,\"height\":120,\"caption\":\"OPENSOURCE DB PRIVATE LIMITED\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/\",\"https:\/\/x.com\/opensource_db\",\"https:\/\/www.youtube.com\/channel\/UCmTI5h\",\"https:\/\/www.linkedin.com\/company\/opensource-db\",\"https:\/\/www.instagram.com\/opensource_db\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\",\"name\":\"Shameer Bhupathi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g\",\"caption\":\"Shameer Bhupathi\"},\"url\":\"https:\/\/test.opensource-db.in\/wp1\/author\/shameer-bhupathi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters - Part-2 - OpenSource DB","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters - Part-2 - OpenSource DB","og_description":"Introduction: I highly recommend starting with Part 1 of this blog series. In Part 2, we\u2019ll dive into more advanced [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2025-06-25T10:35:45+00:00","article_modified_time":"2025-06-25T10:35:47+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png","type":"image\/png"}],"author":"Shameer Bhupathi","twitter_card":"summary_large_image","twitter_creator":"@opensource_db","twitter_site":"@opensource_db","twitter_misc":{"Written by":"Shameer Bhupathi","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/"},"author":{"name":"Shameer Bhupathi","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5"},"headline":"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters &#8211; Part-2","datePublished":"2025-06-25T10:35:45+00:00","dateModified":"2025-06-25T10:35:47+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/"},"wordCount":1132,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png","keywords":["Autovacuum","dba","performance","postgres","Postgresql17"],"articleSection":["PostgreSQL 14","PostgreSQL 15","PostgreSQL 16","Vacuuming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/","url":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/","name":"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters - Part-2 - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png","datePublished":"2025-06-25T10:35:45+00:00","dateModified":"2025-06-25T10:35:47+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png","width":1800,"height":945,"caption":"CS5"},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-vacuum-parameters-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"Understanding PostgreSQL Parameters: Tuning Vacuum Parameters &#8211; Part-2"}]},{"@type":"WebSite","@id":"https:\/\/test.opensource-db.in\/wp1\/#website","url":"https:\/\/test.opensource-db.in\/wp1\/","name":"OpenSource DB","description":"Your Trusted OpenSource Databases partner","publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.opensource-db.in\/wp1\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/test.opensource-db.in\/wp1\/#organization","name":"OPENSOURCE DB PRIVATE LIMITED","url":"https:\/\/test.opensource-db.in\/wp1\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2021\/10\/osdb-logo-tm-2.png","width":368,"height":120,"caption":"OPENSOURCE DB PRIVATE LIMITED"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","https:\/\/x.com\/opensource_db","https:\/\/www.youtube.com\/channel\/UCmTI5h","https:\/\/www.linkedin.com\/company\/opensource-db","https:\/\/www.instagram.com\/opensource_db\/"]},{"@type":"Person","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5","name":"Shameer Bhupathi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2cfa95999202132ded07acd24f6faf25dca145a6c3efe47919204f115ffbf625?s=96&d=mm&r=g","caption":"Shameer Bhupathi"},"url":"https:\/\/test.opensource-db.in\/wp1\/author\/shameer-bhupathi\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/06\/image-27.png",600,315,false]},"rttpg_author":{"display_name":"Shameer Bhupathi","author_link":"https:\/\/test.opensource-db.in\/wp1\/author\/shameer-bhupathi\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-14\/\" rel=\"category tag\">PostgreSQL 14<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-15\/\" rel=\"category tag\">PostgreSQL 15<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-16\/\" rel=\"category tag\">PostgreSQL 16<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-15\/vacuuming\/\" rel=\"category tag\">Vacuuming<\/a>","rttpg_excerpt":"Introduction: I highly recommend starting with Part 1 of this blog series. In Part 2, we\u2019ll dive into more advanced [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/comments?post=8654"}],"version-history":[{"count":11,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8654\/revisions"}],"predecessor-version":[{"id":8668,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8654\/revisions\/8668"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/8663"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=8654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=8654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=8654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}