
{"id":8256,"date":"2025-05-07T11:56:21","date_gmt":"2025-05-07T11:56:21","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=8256"},"modified":"2025-05-07T11:56:26","modified_gmt":"2025-05-07T11:56:26","slug":"understanding-postgresql-parameters-tuning-memory-parameters","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/","title":{"rendered":"Understanding PostgreSQL Parameters:     Tuning Memory Parameters"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m sure you&#8217;d have read my earlier <a href=\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-for-connections-and-authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">blog post<\/a> on this, the <strong><em>Understanding PostgreSQL Parameters<\/em><\/strong> series.<br>These parameters primarily relate to how PostgreSQL utilizes the server&#8217;s memory to efficiently handle data storage and processing operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most important memory-related parameters we&#8217;re going to focus on today are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>shared_buffers<\/li>\n\n\n\n<li>temp_buffers<\/li>\n\n\n\n<li>work_mem<\/li>\n\n\n\n<li>maintenance_work_mem<\/li>\n\n\n\n<li>logical_decoding_work_mem<\/li>\n\n\n\n<li>huge_pages <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These settings control how PostgreSQL manages in-memory data structures during operations such as caching, sorting, temporary table usage, maintenance tasks, and leveraging large memory pages for performance. Proper tuning of these parameters is critical for ensuring optimal database performance, especially under heavy workloads.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why do we need to tune memory allocation parameters in PostgreSQL?<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Tuning memory allocation parameters is essential for maximizing PostgreSQL performance and maintaining system stability. These parameters control how efficiently PostgreSQL can manage query execution, caching, and background operations. Proper tuning helps achieve the following benefits:<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Boosts Query Performance:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Allocating sufficient memory for operations such as sorting, hashing, joins, and temporary tables (via <code>work_mem <\/code>and <code>temp_buffers<\/code>) enables PostgreSQL to process data in-memory, significantly faster than disk-based temporary storage.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Reduces Disk I\/O and Prevents Spilling:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">When memory is insufficient, PostgreSQL resorts to disk for intermediate data during large operations. This increases I\/O load and slows down performance. Parameters like <code>logical_decoding_work_mem <\/code>and <code>maintenance_work_mem <\/code>help prevent unnecessary disk usage by keeping more data in RAM during logical replication and maintenance tasks.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Improves System Stability and Throughput:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Proper use of memory parameters like <code>shared_buffers <\/code>allows PostgreSQL to cache frequently accessed data, minimizing reads from disk and improving response time. However, over-allocating memory can lead to system-level memory pressure, swapping, or even crashes, and so balance is key.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Prevents Disk Space Issues:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">If PostgreSQL consistently spills operations to disk due to poor memory configuration, it may eventually fill up available disk space and especially under heavy workloads. This can result in query failures, replication lag, or even database outages.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">shared_buffers :<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>shared_buffers <\/code>parameter in PostgreSQL controls the amount of memory dedicated to caching data pages in shared memory. This memory is used by all background processes and user connections, making it faster to read\/write data compared to fetching directly from disk. PostgreSQL locks this portion of memory for the entire lifecycle of the database instance.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Show the current value :<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# SHOW shared_buffers ;\n shared_buffers \n----------------\n 128MB\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">How to set shared_buffers<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the ALTER SYSTEM command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET shared_buffers TO '16GB';\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<h4 class=\"wp-block-heading\">Verifying the Change<\/h4>\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 shared_buffers ;\n shared_buffers \n----------------\n 16GB\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Best Practices and Recommendations:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">It is generally recommended to set shared_buffers to 25% to 40% of total system memory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example<\/strong>: For a server with 64 GB RAM, a good value would be around 16 GB.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Impact of Tuning shared_buffers:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Positive<\/strong>: Increasing shared_buffers allows PostgreSQL to cache more data in memory, reducing disk I\/O and improving performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Caution<\/strong>: Setting this value too high (e.g., more than 50 to 70% of total RAM) can result in diminishing returns or memory contention with the operating system cache, leading to performance degradation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">work_mem:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>work_mem <\/code>parameter defines the amount of memory available to internal operations such as sorts and hash tables before PostgreSQL starts writing to temporary disk files. It plays a crucial role in optimizing query performance, especially for operations like <code>ORDER BY, DISTINCT, MERGE JOIN, HASH JOIN, and hash-based<\/code> aggregation. Each operation gets its  <code>work_mem<\/code>, meaning, complex queries or multiple connections may collectively use significantly more memory.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Show the current value:<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# SHOW work_mem ;\n work_mem \n----------\n 4MB\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">How to set work_mem<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the ALTER SYSTEM command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET work_mem TO '64MB';\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 work_mem ;\n work_mem \n----------\n 64MB\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Best Practices and Recommendations:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Increase <code>work_mem<\/code> for queries with large sorts, hash joins, or aggregations to reduce temporary disk usage and improve performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use caution<\/strong>: Since <code>work_mem <\/code>is allocated per operation; increasing it too much can lead to excessive memory usage during high-concurrency workloads.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example<\/strong>: If a query includes 3 sorts and 2 hash joins, it may use up to 5 * <code>work_mem<\/code> for that session.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">maintenance_work_mem :<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>maintenance_work_mem<\/code> sets the maximum amount of memory that maintenance operations can use, such as a <code>VACUUM<\/code>, <code>CREATE INDEX<\/code>, <code>ALTER TABLE ADD FOREIGN KEY<\/code> Since these operations are infrequent and usually run one at a time per session, it&#8217;s generally safe to allocate more memory to this parameter than to <code>work_mem<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Show the current value:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# SHOW maintenance_work_mem ;\n maintenance_work_mem \n----------------------\n 64MB\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">How to set maintenance_work_mem<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the ALTER SYSTEM command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET maintenance_work_mem TO '2GB';\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 maintenance_work_mem ;\n maintenance_work_mem \n----------------------\n 2GB\n(1 row)<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Best Practice Recommendation:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Set <code>maintenance_work_mem <\/code>higher than work_mem to improve the performance of maintenance operations.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">A general recommendation:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\"><code>maintenance_work_mem <\/code>= Total RAM * 0.05<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">temp_buffers :<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">temp_buffers defines the amount of memory allocated for temporary tables in each session. These are used during query execution when temporary tables are created.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Show the current Value:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# SHOW temp_buffers ;\n temp_buffers \n--------------\n 8MB\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">How to set temp_buffers<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can modify the parameter using the ALTER SYSTEM command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# ALTER SYSTEM SET temp_buffers TO '32MB';\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 temp_buffers ;\n temp_buffers \n--------------\n 32MB\n(1 row)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Best Practice Recommendation:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Allocate around 32MB or more, depending on your workload. Useful when you expect queries to create large temporary tables.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">huge_pages :<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>huge_pages<\/code> parameter introduced in PostgreSQL 9.4 to control the use of huge memory pages for the main shared memory area. Huge pages are a feature provided by modern operating systems that allow the use of larger memory pages (typically 2MB or 1GB) instead of the standard 4KB pages. This reduces the overhead of managing a large number of small pages and improves memory access performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Using <\/strong><code>huge_pages <\/code><strong>can result in:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reduced CPU overhead during memory access<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Improved performance for memory-intensive PostgreSQL workloads<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lower TLB (Translation Lookaside Buffer) miss rates.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Valid Settings:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">try \u2013 (default) Attempts to use huge pages; falls back to regular pages if unavailable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">on \u2013 Forces huge page usage; PostgreSQL won&#8217;t start if huge pages can&#8217;t be allocated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">off \u2013 Disables use of huge pages.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Important Notes:<\/strong><\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">To apply changes to this parameter, a PostgreSQL server restart is required.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The operating system must support huge pages, and they must be pre-allocated or enabled via system settings (e.g., vm.nr_hugepages on Linux).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Huge pages are beneficial mainly for systems with large shared memory allocations, such as those with high shared_buffers.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Recommendation:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Use <code>huge_pages <\/code>= try for balanced performance and stability.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">logical_decoding_work_mem :<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>logical_decoding_work_mem<\/code> parameter introduced in PostgreSQL 13. It defines the maximum amount of memory (per replication slot) that can be used for logical decoding before changes are temporarily written (spilled) to disk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Logical decoding is the foundation of features like logical replication, change data capture (CDC), and replication plugins. Efficient memory management during decoding is critical to minimize I\/O and improve replication performance.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Show the current Value:<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=# SHOW logical_decoding_work_mem ;\n logical_decoding_work_mem \n---------------------------\n 64MB\n(1 row)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the amount of publication data and subscription lift and shift, you may adjust this parameter.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Best Practices:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">The default value is typically sufficient for light to moderate transaction volumes in replication scenarios.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Increase the value if you notice frequent disk spills or replication lag during large or long-running transactions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tuning this parameter helps to retain decoded changes in memory, thereby reducing disk I\/O and improving performance in high-throughput or low-latency replication environments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example :<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a replication slot handling high transaction volumes, if <code>logical_decoding_work_mem<\/code> it is set too low, PostgreSQL will frequently spill changes to disk, impacting replication performance. Setting a higher value, like 128MB, allows more changes to be processed in memory, improving throughput.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion :<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PostgreSQL memory parameters are essential for achieving consistent, high-performance database behavior. Parameters like <code>shared_buffers, work_mem,<\/code> <code>maintenance_work_mem <\/code>directly affect query execution and maintenance efficiency, while <code>temp_buffers<\/code>, <code>logical_decoding_work_mem <\/code>params are key for temporary and replication-related operations. Additionally, enabling <code>huge_pages<\/code> can boost performance in memory-intensive environments. However, memory tuning must always be balanced with available system resources to prevent over-allocation and ensure operating system stability. Regular monitoring and testing should guide tuning decisions, adapting to workload changes over time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: I&#8217;m sure you&#8217;d have read my earlier blog post on this, the Understanding PostgreSQL Parameters series.These parameters primarily relate [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":8275,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","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":[29,101,24,44],"class_list":["post-8256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql-14","category-postgresql-15","category-postgresql-16","tag-performance","tag-postgres-16","tag-postgres14","tag-postgres15"],"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 Memory 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:   Tuning Memory Parameters - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"Introduction: I&#8217;m sure you&#8217;d have read my earlier blog post on this, the Understanding PostgreSQL Parameters series.These parameters primarily relate [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-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-05-07T11:56:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-07T11:56:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.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-memory-parameters\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/\"},\"author\":{\"name\":\"Shameer Bhupathi\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\"},\"headline\":\"Understanding PostgreSQL Parameters: Tuning Memory Parameters\",\"datePublished\":\"2025-05-07T11:56:21+00:00\",\"dateModified\":\"2025-05-07T11:56:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/\"},\"wordCount\":1297,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png\",\"keywords\":[\"performance\",\"postgres 16\",\"postgres14\",\"postgres15\"],\"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-tuning-memory-parameters\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/\",\"name\":\"Understanding PostgreSQL Parameters: Tuning Memory Parameters - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png\",\"datePublished\":\"2025-05-07T11:56:21+00:00\",\"dateModified\":\"2025-05-07T11:56:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png\",\"width\":1800,\"height\":945},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understanding PostgreSQL Parameters: Tuning Memory 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:   Tuning Memory 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:   Tuning Memory Parameters - OpenSource DB","og_description":"Introduction: I&#8217;m sure you&#8217;d have read my earlier blog post on this, the Understanding PostgreSQL Parameters series.These parameters primarily relate [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2025-05-07T11:56:21+00:00","article_modified_time":"2025-05-07T11:56:26+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.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-memory-parameters\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/"},"author":{"name":"Shameer Bhupathi","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5"},"headline":"Understanding PostgreSQL Parameters: Tuning Memory Parameters","datePublished":"2025-05-07T11:56:21+00:00","dateModified":"2025-05-07T11:56:26+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/"},"wordCount":1297,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png","keywords":["performance","postgres 16","postgres14","postgres15"],"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-tuning-memory-parameters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/","url":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/","name":"Understanding PostgreSQL Parameters: Tuning Memory Parameters - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png","datePublished":"2025-05-07T11:56:21+00:00","dateModified":"2025-05-07T11:56:26+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png","width":1800,"height":945},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/understanding-postgresql-parameters-tuning-memory-parameters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"Understanding PostgreSQL Parameters: Tuning Memory 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\/05\/image-21.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2025\/05\/image-21.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>","rttpg_excerpt":"Introduction: I&#8217;m sure you&#8217;d have read my earlier blog post on this, the Understanding PostgreSQL Parameters series.These parameters primarily relate [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8256","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=8256"}],"version-history":[{"count":15,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8256\/revisions"}],"predecessor-version":[{"id":8278,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/8256\/revisions\/8278"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/8275"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=8256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=8256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=8256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}