{"id":7240,"date":"2016-03-11T06:11:34","date_gmt":"2016-03-11T05:11:34","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/"},"modified":"2016-03-11T06:11:34","modified_gmt":"2016-03-11T05:11:34","slug":"pre-warming-the-buffer-cache-in-postgresql","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/","title":{"rendered":"Pre-warming the buffer cache in PostgreSQL"},"content":{"rendered":"<p>When a database gets shutdown for patching, operating system maintenance or other reasons you completely lose the contents of the buffer cache. No surprise. Memory is not persistent. Wouldn&#8217;t it be nice to load the most important tables to the cache when the instance starts automatically? This would reduce the time for the most important queries to return the results as blocks would not be needed to read from disk. PostgreSQL has a solution for that which is called <a href=\"www.postgresql.org\/docs\/current\/static\/pgprewarm.html\" target=\"_blank\" rel=\"noopener\">pg_prewarm<\/a>. This is a contrib module which is available by default. <\/p>\n<p>The extension provided by default can be installed by just issuing the &#8220;create extension&#8221; statement:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n(postgres@[local]:5001) [postgres] &gt; ! ls \/u01\/app\/postgres\/product\/95\/db_0\/share\/extension\/*prewarm*\n\/u01\/app\/postgres\/product\/95\/db_0\/share\/extension\/pg_prewarm--1.0.sql  \/u01\/app\/postgres\/product\/95\/db_0\/share\/extension\/pg_prewarm.control\n(postgres@[local]:5001) [postgres] &gt; create extension pg_prewarm;\nCREATE EXTENSION\nTime: 174.232 ms\n(postgres@[local]:5001) [postgres] &gt; dx pg_pre*\n             List of installed extensions\n    Name    | Version | Schema |      Description      \n------------+---------+--------+-----------------------\n pg_prewarm | 1.0     | public | prewarm relation data\n(1 row)\n<\/pre>\n<p>So, how does it work? Lets create some sample data in a first step:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n(postgres@[local]:5001) [postgres] &gt; create table prewarm ( a int, b varchar(100) );\nCREATE TABLE\nTime: 51.165 ms\n(postgres@[local]:5001) [postgres] &gt; with generator as ( select generate_series(1,1000000) a )\ninsert into prewarm ( select a, md5(a::text) from generator );\n<\/pre>\n<p>To get some idea on how long it takes to read the whole table I&#8217;ll restart the instance and do a count(*):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] pg_ctl -D \/u02\/pgdata\/PG9 stop -m fast\npostgres@oel7:\/home\/postgres\/ [PG9] sudo sh -c 'echo 3 &gt;\/proc\/sys\/vm\/drop_caches'\npostgres@oel7:\/home\/postgres\/ [PG9] pg_ctl -D \/u02\/pgdata\/PG9 start\n<\/pre>\n<p>Note: the sudo command drops the kernel cache (see <a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/sysctl\/vm.txt\" target=\"_blank\" rel=\"noopener\">here<\/a> for details).<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] time psql -c \"select count(*) from prewarm\" postgres\n  count  \n---------\n 1000000\n(1 row)\n\nreal\t0m0.908s\nuser\t0m0.005s\nsys\t0m0.000s\n<\/pre>\n<p>Almost a second to scan through the 1&#8217;000&#8217;000 rows to get the count. Lets do the same test but pre-warming the table before:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] pg_ctl -D \/u02\/pgdata\/PG9 stop -m fast\npostgres@oel7:\/home\/postgres\/ [PG9] sudo sh -c 'echo 3 &gt;\/proc\/sys\/vm\/drop_caches'\npostgres@oel7:\/home\/postgres\/ [PG9] pg_ctl -D \/u02\/pgdata\/PG9 start\npostgres@oel7:\/home\/postgres\/ [PG9] psql -c \"select pg_prewarm('prewarm')\" postgres\n pg_prewarm \n------------\n       8334\n(1 row)\n<\/pre>\n<p>Note: The number returned by pg_prewarm is the number of pages affected\/pre-warmed.<br \/>\nHow long does it now take to get the result:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] time psql -c \"select count(*) from prewarm\" postgres\n  count  \n---------\n 1000000\n(1 row)\n\n\nreal\t0m0.189s\nuser\t0m0.002s\nsys\t0m0.004s\n<\/pre>\n<p>Not so bad, isn&#8217;t it? There is a second parameter for pg_prewarm which specifies the method to use (copied from the documentation):<\/p>\n<ul>\n<li>prefetch: issues asynchronous prefetch requests to the operating system, if this is supported, or throws an error otherwise<\/li>\n<li>read: reads the requested range of blocks; unlike prefetch, this is synchronous and supported on all platforms and builds, but may be slower<\/li>\n<li>buffer: reads the requested range of blocks into the database buffer cache<\/li>\n<\/ul>\n<p>The default is &#8220;buffer&#8221;. If you write a little script which pre-warms the tables you need and put this at the end of your PostgreSQL startup script you can save the time it takes to load the blocks\/pages from disk when the first requests come in after a restart of the instance.<\/p>\n<p>There is another extension called <a href=\"https:\/\/github.com\/gurjeet\/pg_hibernator\" target=\"_blank\" rel=\"noopener\">pg_hibernater<\/a> which automatically stores the IDs of the buffers in the buffer cache when the server shuts down and re-reads them again automatically when the server starts. <\/p>\n<p>To install this module: Download, extract, make install as the postgres user:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/var\/tmp\/ [PG9] unzip pg_hibernator-master.zip \nArchive:  pg_hibernator-master.zip\n32b344fab58242552730e142adffa8650c7df4ac\n   creating: pg_hibernator-master\/\n  inflating: pg_hibernator-master\/LICENSE  \n  inflating: pg_hibernator-master\/Makefile  \n  inflating: pg_hibernator-master\/README.md  \n  inflating: pg_hibernator-master\/misc.c  \n  inflating: pg_hibernator-master\/pg_hibernate.c  \n  inflating: pg_hibernator-master\/pg_hibernate_9.3.c  \n  inflating: pg_hibernator-master\/pg_hibernator.h  \n   creating: pg_hibernator-master\/tests\/\n  inflating: pg_hibernator-master\/tests\/pg_hibernator_comparison_chart.ods  \n  inflating: pg_hibernator-master\/tests\/test_run.txt  \npostgres@oel7:\/var\/tmp\/ [PG9] cd pg_hibernator-master\npostgres@oel7:\/var\/tmp\/pg_hibernator-master\/ [PG9] make install\n<\/pre>\n<p>We&#8217;ll need to add the module to the shared_preload_libraries parameter for pg_hibernator to start up:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n(postgres@[local]:5001) [postgres] &gt; show shared_preload_libraries;\n shared_preload_libraries \n--------------------------\n \n(1 row)\n\nTime: 0.283 ms\n\n(postgres@[local]:5001) [postgres] &gt; alter system set shared_preload_libraries='pg_hibernator';\nALTER SYSTEM\nTime: 59.374 ms\n<\/pre>\n<p>Restart the server:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] pg_ctl -D \/u02\/pgdata\/PG9 restart -m fast\n<\/pre>\n<p>Double-check the setting:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5001) [postgres] &gt; show shared_preload_libraries ;\n shared_preload_libraries \n--------------------------\n pg_hibernator\n(1 row)\n\nTime: 0.307 ms\n<\/pre>\n<p>There are a few parameters which control the behavior (<a href=\"https:\/\/github.com\/gurjeet\/pg_hibernator\" target=\"_blank\" rel=\"noopener\">check the documentation for details<\/a>):<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n(postgres@[local]:5001) [postgres] &gt; show pg_hibernator.enabled;\n pg_hibernator.enabled \n-----------------------\n on\n(1 row)\n\nTime: 0.148 ms\n(postgres@[local]:5001) [postgres] &gt; show pg_hibernator.parallel;\n pg_hibernator.parallel \n------------------------\n off\n(1 row)\n\nTime: 0.140 ms\n(postgres@[local]:5001) [postgres] &gt; show pg_hibernator.default_database;\n pg_hibernator.default_database \n--------------------------------\n postgres\n(1 row)\n\nTime: 0.142 ms\n<\/pre>\n<p>Once the module is running there is a new background process called &#8220;Buffer Saver&#8221;. This process will save the buffer IDs when the server shuts down.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] ps -ef | grep \"Buffer Saver\"\npostgres 22773 22764  0 16:12 ?        00:00:00 postgres: bgworker: Buffer Saver   \npostgres 22810 20779  0 16:17 pts\/2    00:00:00 grep --color=auto Buffer Saver\n<\/pre>\n<p>If you check your data directory you should find that pg_hibernater writes a file per database which has buffers in the cache on shutdown of the server: <\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] ls -la $PGDATA\/pg_hibernator\/\ntotal 12\ndrwx------.  2 postgres postgres   32 Mar  9 16:18 .\ndrwx------. 19 postgres postgres 4096 Mar  9 16:18 ..\n-rw-------.  1 postgres postgres   91 Mar  9 16:18 1.save\n-rw-------.  1 postgres postgres  619 Mar  9 16:18 2.save\n<\/pre>\n<p>So, lets do the same test again:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] pg_ctl -D \/u02\/pgdata\/PG9 stop -m fast\npostgres@oel7:\/home\/postgres\/ [PG9] sudo sh -c 'echo 3 &gt;\/proc\/sys\/vm\/drop_caches'\npostgres@oel7:\/home\/postgres\/ [PG9] pg_ctl -D \/u02\/pgdata\/PG9 start\n<\/pre>\n<p>How fast is it?<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@oel7:\/home\/postgres\/ [PG9] time psql -c \"select count(*) from prewarm\" postgres\n  count  \n---------\n 1000000\n(1 row)\n\n\nreal\t0m0.623s\nuser\t0m0.004s\nsys\t0m0.000s\n<\/pre>\n<p>Not as fast as with the pg_prewarm method but still faster as without any pre-warming. Maybe this is because the implementation is different, I did not test it entirely. At least it automates the save and restore of the buffer cache. For taking this into production some more testing is required.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When a database gets shutdown for patching, operating system maintenance or other reasons you completely lose the contents of the buffer cache. No surprise. Memory is not persistent. Wouldn&#8217;t it be nice to load the most important tables to the cache when the instance starts automatically? This would reduce the time for the most important&hellip;&nbsp;<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133],"tags":[],"class_list":["post-7240","post","type-post","status-publish","format-standard","category-database"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Pre-warming the buffer cache in PostgreSQL - dbi services Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pre-warming the buffer cache in PostgreSQL\" \/>\n<meta property=\"og:description\" content=\"When a database gets shutdown for patching, operating system maintenance or other reasons you completely lose the contents of the buffer cache. No surprise. Memory is not persistent. Wouldn&#8217;t it be nice to load the most important tables to the cache when the instance starts automatically? This would reduce the time for the most important&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-11T05:11:34+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"headline\":\"Pre-warming the buffer cache in PostgreSQL\",\"datePublished\":\"2016-03-11T05:11:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/\"},\"wordCount\":539,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/\",\"name\":\"Pre-warming the buffer cache in PostgreSQL - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2016-03-11T05:11:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/pre-warming-the-buffer-cache-in-postgresql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pre-warming the buffer cache in PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"caption\":\"Open source Team\"},\"description\":\"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pre-warming the buffer cache in PostgreSQL - dbi services Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"Pre-warming the buffer cache in PostgreSQL","og_description":"When a database gets shutdown for patching, operating system maintenance or other reasons you completely lose the contents of the buffer cache. No surprise. Memory is not persistent. Wouldn&#8217;t it be nice to load the most important tables to the cache when the instance starts automatically? This would reduce the time for the most important&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2016-03-11T05:11:34+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Open source Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"headline":"Pre-warming the buffer cache in PostgreSQL","datePublished":"2016-03-11T05:11:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/"},"wordCount":539,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/","url":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/","name":"Pre-warming the buffer cache in PostgreSQL - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-03-11T05:11:34+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/pre-warming-the-buffer-cache-in-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Pre-warming the buffer cache in PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","caption":"Open source Team"},"description":"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.","url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/7240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=7240"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/7240\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=7240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=7240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=7240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}