
{"id":8716,"date":"2025-07-02T10:39:22","date_gmt":"2025-07-02T10:39:22","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=8716"},"modified":"2025-07-02T10:39:32","modified_gmt":"2025-07-02T10:39:32","slug":"understanding-postgresql-parameters-background-writer-parameters","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/","title":{"rendered":"Understanding PostgreSQL Parameters: Background Writer parameters"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>background writer<\/code> is a crucial component in <code>PostgreSQL <\/code>that plays an essential role in maintaining database performance and stability. Its main function is to write dirty pages (i.e., modified pages in memory) from the shared buffer cache to the disk in a controlled and efficient manner. This process helps reduce I\/O spikes and ensures that the system remains responsive, especially under heavy load.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Although the <code>Write-Ahead Logging<\/code> (WAL) mechanism is responsible for recording all changes to ensure durability. The bgwriter helps by keeping the shared buffers clean and reducing the need for backend processes to perform writes themselves.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The pg_catalog views that tell a story:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s break down some of the key metrics from <code>pg_stat_bgwriter <\/code>and <code>pg_stat_checkpointer <\/code>(from PG17) and what they can tell us about your system\u2019s health and configuration.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>maxwritten_clean<\/code>: Is the background writer hitting its limits?<br>The <code>maxwritten_clean <\/code>counter tracks how many times the background writer stopped writing buffers because it hit the <code>bgwriter_lru_maxpages <\/code>limit.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What to watch for:<\/strong> If this number is consistently high, it means the background writer isn&#8217;t allowed to do enough work during their cycle.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What to do:<\/strong> Consider increasing <code>bgwriter_lru_maxpages <\/code>to allow more buffers to be written per round.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why it matters<\/strong>: A restricted bgwriter can lead to more dirty buffers being written by backend processes, which increases query latency and I\/O spikes.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><code>buffers_clean <\/code>vs <code>buffers_backend<\/code>: Who\u2019s doing the dirty work?<br><code>buffers_clean<\/code>: number of buffers written by the background writer,<br><code>buffers_backend<\/code>: number of buffers written by PostgreSQL backend processes (your queries).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Ideally, <code>buffers_clean <\/code>should be higher than <code>buffers_backend<\/code>. The more work the bgwriter does in the background, the less pressure on your query processes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>buffers_backend <\/code>&gt; <code>buffers_clean<\/code>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Increase <code>bgwriter_lru_multiplier<\/code>,<br>Decrease <code>bgwriter_delay<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These settings make the background writer more aggressive and responsive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Additionally, this could indicate:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shared Buffers may be too small: <\/strong>If the &#8220;hot&#8221; part of your data doesn&#8217;t fit into shared buffers, you\u2019ll see buffers churn between RAM and disk more frequently, causing backend processes to write their own dirty pages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">TL;DR: The background writer should ideally shoulder the I\/O burden, not your user queries.<\/p>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><code>buffers_backend_fsync<\/code>: Are queries doing their own fsync?<br>This metric shows how often PostgreSQL backends (not the background writer) are forced to perform their own fsync() calls to flush buffers to disk. This typically happens when the internal fsync queue is full or stalled.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Rule of thumb:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any non-zero value here is a red flag.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>It suggests:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Disk I\/O congestion<br>Improperly tuned checkpoint settings<br>Or, in older versions of PostgreSQL, limitations in fsync queue handling<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Good news<\/strong>: Newer <code>PostgreSQL <\/code>versions (13+) have dramatically improved how fsync is handled, and in modern systems, it\u2019s increasingly rare to see non-zero values here.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Several configuration parameters control the behavior of the <code>background writer<\/code>:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>bgwriter_delay,<\/li>\n\n\n\n<li>bgwriter_flush_after,<\/li>\n\n\n\n<li>bgwriter_lru_maxpages,<\/li>\n\n\n\n<li>bgwriter_lru_multiplier.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Why do we need to tune <code>bgwriter<\/code> parameters?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>bgwriter <\/code>Parameters control the <code>background writer<\/code> process, which is responsible for delaying the flushing of dirty pages (modified data not yet written to disk). This helps reduce the load on backend processes and keeps the database responsive, especially under heavy workloads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tuning these parameters is important because they determine how aggressively and how frequently the <code>background writer<\/code> flushes dirty pages to disk. If not properly configured, it can lead to several issues:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Performance bottlenecks during peak loads<\/li>\n\n\n\n<li>Unnecessary disk I\/O if the background writer is too aggressive<\/li>\n\n\n\n<li>Backend processes are being forced to write data themselves, which slows down user queries<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">1.<code>bgwriter_delay<\/code>:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>bgwriter_delay <\/code>defines the delay between activity rounds of the background writer process in PostgreSQL. When transactions modify data, these changes need to be flushed to disk eventually. The background writer helps in writing dirty (modified) pages to disk in the background to reduce the load during checkpoints. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">To check the current value:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show bgwriter_delay ;\n bgwriter_delay \n----------------\n 200ms\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">How to set <code>bgwriter_delay<\/code><\/h4>\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 bgwriter_delay TO '150ms';\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<h4 class=\"wp-block-heading\">Verifying the Change<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">After the reload, re-check the parameter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show bgwriter_delay ;\n bgwriter_delay \n----------------\n 150ms\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Impact :<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If your system experiences frequent high-write transactions, it is recommended to tune this value based on your server&#8217;s workload. Lowering the value (e.g., to 150ms) causes the background writer to run more frequently, helping keep modified pages flushed to disk more regularly. This can reduce latency spikes during checkpoints but may increase I\/O. On the other hand, increasing the value e.g., to 250ms, means the background writer runs less frequently, which might be acceptable for systems with fewer writes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.<code>bgwriter_flush_after<\/code>:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>bgwriter_flush_after <\/code>controls how much data (in kilobytes) the background writer accumulates before issuing a flush to disk. When the background writer writes dirty (modified) pages to disk, this parameter defines the threshold after which an fsync is triggered to flush those writes to physical disk.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">To check the current value:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show bgwriter_flush_after;\n bgwriter_flush_after \n----------------------\n 512kB\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">How to set <code>bgwriter_flush_after<\/code><\/h4>\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 bgwriter_flush_after TO '256kB';\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<h4 class=\"wp-block-heading\">Verifying the Change<\/h4>\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 bgwriter_flush_after;\n bgwriter_flush_after \n----------------------\n 256kB\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Impact:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If you set this value too low, the system may issue flushes too frequently, causing unnecessary disk I\/O. If it&#8217;s too high, you may experience I\/O spikes as more data is flushed all at once. To tune these parameters <code>bgwriter_flush_after <\/code>Based on your storage performance. For fast disks (e.g., SSDs), a higher value might work well. For slower disks, smaller values can prevent I\/O stalls.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.<code>bgwriter_lru_maxpages<\/code>:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>bgwriter_lru_maxpages <\/code>controls the maximum number of dirty pages the background writer can write to disk in each round. During each cycle, the background writer scans and writes a limited number of these pages to help reduce I\/O spikes during checkpoints.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">To check the current value:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show bgwriter_lru_maxpages ;\n bgwriter_lru_maxpages \n-----------------------\n 100\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">How to set <code>bgwriter_lru_maxpages<\/code><\/h4>\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 bgwriter_lru_maxpages TO 200;\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<h4 class=\"wp-block-heading\">Verifying the Change<\/h4>\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 bgwriter_lru_maxpages ;\n bgwriter_lru_maxpages \n-----------------------\n 200\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Impact:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If your system handles high transaction volumes, increasing this value allows more dirty pages to be written per round, which can improve performance by reducing the checkpoint burden. If the value is set too low (e.g., 50), the background writer may not keep up with the write load, potentially leading to disk I\/O issues or slower performance during checkpoints. Increase the value if your system has frequent writes and sufficient I\/O capacity. Lower it only if you&#8217;re seeing unnecessary background writes or want to reduce I\/O pressure.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">4.<code>bgwriter_lru_multiplier<\/code>:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The number of dirty buffers written in each round is based on the number of new buffers that have been needed by server processes during recent rounds.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">To check the current value:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# show bgwriter_lru_multiplier;\n bgwriter_lru_multiplier \n-------------------------\n 2\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">How to set <code>bgwriter_lru_multiplier<\/code><\/h4>\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 bgwriter_lru_multiplier TO 2.5;\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<h4 class=\"wp-block-heading\">Verifying the Change<\/h4>\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 bgwriter_lru_multiplier;\n bgwriter_lru_multiplier \n-------------------------\n 2.5\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Impact:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Increasing the value of the <code>Background Writer<\/code> will make it more aggressive in its efforts to keep pages clean. This can be useful for systems with heavy write loads, as it reduces the likelihood of backends encountering dirty pages that need to be written to disk during transaction processing.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Conclusion:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>PostgreSQL background writer<\/code> is a vital component responsible for writing dirty pages from memory to disk smoothly and efficiently. By offloading this task from backend processes, it helps reduce latency spikes, especially during checkpoints, and keeps the database responsive under heavy workloads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tuning background writer parameters such as <code>bgwriter_delay<\/code>, <code>bgwriter_flush_after<\/code>, <code>bgwriter_lru_maxpages<\/code>, and <code>bgwriter_lru_multiplier<\/code> allows administrators to control how aggressively and frequently these writes occur. Proper tuning helps balance write performance and I\/O load, which is critical for high-throughput or write-intensive environments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding and configuring these settings enables <code>PostgreSQL DBAs<\/code> to prevention of unnecessary disk I\/O, avoids performance bottlenecks, and maintains optimal buffer management. Overall, effective use of the background writer settings plays a key role in achieving consistent and stable database performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: The background writer is a crucial component in PostgreSQL that plays an essential role in maintaining database performance and [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":8753,"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],"tags":[163,34,45,29,164,165,44,26],"class_list":["post-8716","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql-14","category-postgresql-15","category-postgresql-16","tag-bgwriter","tag-dba","tag-open-source-databases","tag-performance","tag-pg_stat_bgwriter","tag-pg_stat_checkpointer","tag-postgres15","tag-postgresql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Understanding PostgreSQL Parameters: Background Writer parameters - 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: Background Writer parameters - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"Introduction: The background writer is a crucial component in PostgreSQL that plays an essential role in maintaining database performance and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/\" \/>\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-07-02T10:39:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-02T10:39:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.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-background-writer-parameters\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/\"},\"author\":{\"name\":\"Shameer Bhupathi\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\"},\"headline\":\"Understanding PostgreSQL Parameters: Background Writer parameters\",\"datePublished\":\"2025-07-02T10:39:22+00:00\",\"dateModified\":\"2025-07-02T10:39:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/\"},\"wordCount\":1274,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png\",\"keywords\":[\"bgwriter\",\"dba\",\"open-source databases\",\"performance\",\"pg_stat_bgwriter\",\"pg_stat_checkpointer\",\"postgres15\",\"postgresql\"],\"articleSection\":[\"PostgreSQL 14\",\"PostgreSQL 15\",\"PostgreSQL 16\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/\",\"name\":\"Understanding PostgreSQL Parameters: Background Writer parameters - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png\",\"datePublished\":\"2025-07-02T10:39:22+00:00\",\"dateModified\":\"2025-07-02T10:39:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png\",\"width\":1800,\"height\":945,\"caption\":\"CS1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding PostgreSQL Parameters: Background Writer parameters\"}]},{\"@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: Background Writer parameters - 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: Background Writer parameters - OpenSource DB","og_description":"Introduction: The background writer is a crucial component in PostgreSQL that plays an essential role in maintaining database performance and [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2025-07-02T10:39:22+00:00","article_modified_time":"2025-07-02T10:39:32+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.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-background-writer-parameters\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/"},"author":{"name":"Shameer Bhupathi","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5"},"headline":"Understanding PostgreSQL Parameters: Background Writer parameters","datePublished":"2025-07-02T10:39:22+00:00","dateModified":"2025-07-02T10:39:32+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/"},"wordCount":1274,"commentCount":1,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png","keywords":["bgwriter","dba","open-source databases","performance","pg_stat_bgwriter","pg_stat_checkpointer","postgres15","postgresql"],"articleSection":["PostgreSQL 14","PostgreSQL 15","PostgreSQL 16"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/","url":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/","name":"Understanding PostgreSQL Parameters: Background Writer parameters - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png","datePublished":"2025-07-02T10:39:22+00:00","dateModified":"2025-07-02T10:39:32+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png","width":1800,"height":945,"caption":"CS1"},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-background-writer-parameters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"Understanding PostgreSQL Parameters: Background Writer parameters"}]},{"@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\/07\/image-29.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/07\/image-29.png",600,315,false]},"rttpg_author":{"display_name":"Shameer Bhupathi","author_link":"https:\/\/test.opensource-db.in\/wp1\/author\/shameer-bhupathi\/"},"rttpg_comment":1,"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>","rttpg_excerpt":"Introduction: The background writer is a crucial component in PostgreSQL that plays an essential role in maintaining database performance and [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8716","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=8716"}],"version-history":[{"count":13,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8716\/revisions"}],"predecessor-version":[{"id":8763,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8716\/revisions\/8763"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/8753"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=8716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=8716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=8716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}