{"id":8831,"date":"2016-09-11T05:45:59","date_gmt":"2016-09-11T03:45:59","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/"},"modified":"2016-09-11T05:45:59","modified_gmt":"2016-09-11T03:45:59","slug":"what-the-hell-are-these-template0-and-template1-databases-in-postgresql","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/","title":{"rendered":"What the hell are these template0 and template1 databases in PostgreSQL?"},"content":{"rendered":"<p>When people start to work with PostgreSQL, especially when they are used to Oracle, some things might be very confusing. A few of the questions we usually get asked are:<\/p>\n<ul>\n<li>Where is the listener and how can I configure it?<\/li>\n<li>When you talk about a PostgreSQL cluster where are the other nodes?<\/li>\n<li>Why do we have these template databases and what are they used for?<\/li>\n<li>&#8230;and some others&#8230;<\/li>\n<\/ul>\n<p>In this post we&#8217;ll look at the last point: Why do we have two template databases (template0 and template1) and additionally a database called &#8220;postgres&#8221;? That makes three databases by default. In Oracle we only have one, well two when you use pluggable databases (the root and pdb$seed). Why does PostgreSQL need three by default? Isn&#8217;t that only overhead? Lets see &#8230; <\/p>\n<p><!--more--><\/p>\n<p>To begin with: Assuming these databases are really not required we can drop them, can&#8217;t we?<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [postgres] &gt; l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   \n-----------+----------+----------+-------------+-------------+-----------------------\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\n           |          |          |             |             | postgres=CTc\/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\n           |          |          |             |             | postgres=CTc\/postgres\n<\/pre>\n<p>Can we drop the &#8220;postgres&#8221; database?<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [postgres] &gt; drop database postgres;\nERROR:  cannot drop the currently open database\nTime: 1.052 ms\n<\/pre>\n<p>Ok, this is the first point to remember: You can not drop a database which users are currently connected to (in this case it is my own connection). So lets try to connect to template1 and then drop the &#8220;postgres&#8221; database:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@pgbox:\/home\/postgres\/ [PG960] psql template1\npsql (9.6rc1 dbi services build)\nType \"help\" for help.\n\n(postgres@[local]:5432) [template1] &gt; drop database postgres;\nDROP DATABASE\nTime: 489.287 ms\n(postgres@[local]:5432) [template1] &gt; \n<\/pre>\n<p>Uh, our default &#8220;postgres&#8221; database is gone. Does it matter? Not really from a PostgreSQL perspective but probably all your clients (pgadmin, monitoring scripts, &#8230;) will have a problem now:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@pgbox:\/home\/postgres\/ [postgres] psql\npsql: FATAL:  database \"postgres\" does not exist\n<\/pre>\n<p>The &#8220;postgres&#8221; database is meant as a default database for clients to connect to. When you administer a PostgreSQL instance which runs under the postgres operating system user the default database that is used for a connection is the same as the username =&gt; postgres. Now that this database does not exist anymore you can not longer connect if you do not provide a database name in you connection request. But we can still connect to &#8220;template1&#8221;:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@pgbox:\/home\/postgres\/ [postgres] psql template1\npsql (9.6rc1 dbi services build)\nType \"help\" for help.\n<\/pre>\n<p>Second thing to remember: The &#8220;postgres&#8221; database is meant as a default database for connections. It is not required, you can drop it but probably a lot of tools you use will need to be adjusted because they assume that the &#8220;postgres&#8221; database is there by default.<\/p>\n<p>Luckily we can easy recover from that:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@pgbox:\/home\/postgres\/ [postgres] psql template1\npsql (9.6rc1 dbi services build)\nType \"help\" for help.\n\n(postgres@[local]:5432) [template1] &gt; create database postgres;\nCREATE DATABASE\n(postgres@[local]:5432) [template1] &gt; l\n                                  List of databases\n   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   \n-----------+----------+----------+-------------+-------------+-----------------------\n postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | \n template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\n           |          |          |             |             | postgres=CTc\/postgres\n template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c\/postgres          +\n           |          |          |             |             | postgres=CTc\/postgres\n(3 rows)\n<\/pre>\n<p>What happened? We connected to template1 again and re-created the &#8220;postgres&#8221; database. Of course everything we added to the &#8220;postgres&#8221; database before we dropped it is not any more available.  This brings us to the next question: When we create a new database what or who defines the initial contents?<\/p>\n<p>Third thing to remember: When you create a new database by using the syntax &#8220;create database [DB_NAME]&#8221; you get an exact copy of template1.<\/p>\n<p>Really? What happens when I modify template1? Lets add one table and one extension:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@pgbox:\/home\/postgres\/ [postgres] psql template1\npsql (9.6rc1 dbi services build)\nType \"help\" for help.\n\n(postgres@[local]:5432) [template1] &gt; create table my_test_tab ( a int );\nCREATE TABLE\n(postgres@[local]:5432) [template1] &gt; create extension hstore;\nCREATE EXTENSION\nTime: 123.722 ms\n(postgres@[local]:5432) [template1] &gt; dx\n                           List of installed extensions\n  Name   | Version |   Schema   |                   Description                    \n---------+---------+------------+--------------------------------------------------\n hstore  | 1.4     | public     | data type for storing sets of (key, value) pairs\n plpgsql | 1.0     | pg_catalog | PL\/pgSQL procedural language\n(2 rows)\n<\/pre>\n<p>If the above statement is true every new database created with the above syntax should contain the table and the extension, right?<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [postgres] &gt; c db_test\nYou are now connected to database \"db_test\" as user \"postgres\".\n(postgres@[local]:5432) [db_test] &gt; d\n            List of relations\n Schema |    Name     | Type  |  Owner   \n--------+-------------+-------+----------\n public | my_test_tab | table | postgres\n(1 row)\n\n(postgres@[local]:5432) [db_test] &gt; dx\n                           List of installed extensions\n  Name   | Version |   Schema   |                   Description                    \n---------+---------+------------+--------------------------------------------------\n hstore  | 1.4     | public     | data type for storing sets of (key, value) pairs\n plpgsql | 1.0     | pg_catalog | PL\/pgSQL procedural language\n(2 rows)\n<\/pre>\n<p>Whatever you put into template1 will be available in a new database if you use the following syntax: &#8220;create database [DB_NAME];&#8221; This can simplify your deployments a lot if you rely on pre-installed objects for e.g. monitoring or development.<\/p>\n<p>Ok, I got it, but what is template0 for then? For this to understand we first take a look at pg_database, especially two columns: datallowconn and datistemplate:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [db_test] &gt; select datname,datallowconn,datistemplate from pg_database order by 3;\n  datname  | datallowconn | datistemplate \n-----------+--------------+---------------\n postgres  | t            | f\n db_test   | t            | f\n template1 | t            | t\n template0 | f            | t\n(4 rows)\n<\/pre>\n<p>When you take a look at &#8220;datallowcon&#8221; the only database that has set this to false is &#8220;template0&#8221;. Do you remember the beginning of this post when we tried to delete the &#8220;postgres&#8221; database? You can only delete a database when there are no connections. But: You can only create a database from another database if there are no connections to the source, too. Really? Why then can I create a new database when I am connected to template1 when template1 is the source for the new database?<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [template1] &gt; create database db_test_2;\nCREATE DATABASE\n<\/pre>\n<p>Confusing? This does not work anymore if there is another session connected to template1.<\/p>\n<p>Lets try to create another new database but this time we we use db_test as the source. Yes, this is possible if you slightly adjust the syntax. But before we create the database we create a another connection to db_test:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [template1] &gt; q\npostgres@pgbox:\/home\/postgres\/ [PG960] psql db_test\npsql (9.6rc1 dbi services build)\nType \"help\" for help.\n<\/pre>\n<p>In another session we try to create new database with db_test as the source:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@pgbox:\/home\/postgres\/ [PG960] psql postgres\npsql (9.6rc1 dbi services build)\nType \"help\" for help.\n\n(postgres@[local]:5432) [postgres] &gt; create database db_test_3 template db_test;\nERROR:  source database \"db_test\" is being accessed by other users\nDETAIL:  There is 1 other session using the database.\n<\/pre>\n<p>Fourth point to remember: For creating new databases you can use whatever database you like as the source when you specify then template explicitly.<br \/>\nFifth point to remember: When you want to drop a database or when you want to create a database there must be no connections to the database you either want to drop or you want to create a new database from.<\/p>\n<p>Coming back to the &#8220;datistemplate&#8221; and &#8220;datallowcon&#8221; settings: template0 is the only database that has &#8220;datallowcon&#8221; set to false, why? Because template0 is meant as the default unmodifiable database. You never should make any changes there. In a brand new PostgreSQL instance template0 and template1 are exactly the same. But why do I need both of them then? Assume you messed up template1 somehow (installed too many objects, for example). Using template one you still can recover from that easily:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\npostgres@pgbox:\/home\/postgres\/ [PG960] psql postgres\npsql (9.6rc1 dbi services build)\nType \"help\" for help.\n(postgres@[local]:5432) [postgres] &gt; update pg_database set datistemplate = false where datname = 'template1';\nUPDATE 1\n(postgres@[local]:5432) [postgres] &gt; drop database template1;\nDROP DATABASE\n(postgres@[local]:5432) [postgres] &gt; create database template1 template template0;\nCREATE DATABASE\n(postgres@[local]:5432) [postgres] &gt; update pg_database set datistemplate = true where datname = 'template1';\nUPDATE 1\n<\/pre>\n<p>What happened here? I modified template1 to not being a template anymore because you can not drop a database flagged as a template. Then I dropped and re-created the template1 database by using template0 as the template. Now my template1 is an exact copy of template0 again and all the things I messed up are gone. Another use case for this is: Image you modified template1 to include the stuff you rely on but at some point in the future you need a new database which shall be without your modifications (e.g. restoring a dump). For this you always can use template0 as a template because template0 is always clean. And this is why connections are not allowed to template0. <\/p>\n<p>Of course you can create your own template database(s) by setting the &#8220;datistemplate&#8221; to true:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [postgres] &gt; update pg_database set datistemplate = true where datname = 'db_test';\nUPDATE 1\n(postgres@[local]:5432) [postgres] &gt; drop database db_test;\nERROR:  cannot drop a template database\n<\/pre>\n<p>What about the overhead:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n(postgres@[local]:5432) [postgres] &gt; select * from pg_size_pretty ( pg_database_size ( 'template0' ));\n pg_size_pretty \n----------------\n 7233 kB\n(1 row)\n\n(postgres@[local]:5432) [postgres] &gt; select * from pg_size_pretty ( pg_database_size ( 'template1' ));\n pg_size_pretty \n----------------\n 7233 kB\n(1 row)\n\n(postgres@[local]:5432) [postgres] &gt; select * from pg_size_pretty ( pg_database_size ( 'postgres' ));\n pg_size_pretty \n----------------\n 7343 kB\n(1 row)\n<\/pre>\n<p>Should not really be an issue on todays hardware. Hope this puts some light on these default databases.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When people start to work with PostgreSQL, especially when they are used to Oracle, some things might be very confusing. A few of the questions we usually get asked are: Where is the listener and how can I configure it? When you talk about a PostgreSQL cluster where are the other nodes? Why do we [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[77],"type_dbi":[],"class_list":["post-8831","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>What the hell are these template0 and template1 databases in PostgreSQL? - dbi 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\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What the hell are these template0 and template1 databases in PostgreSQL?\" \/>\n<meta property=\"og:description\" content=\"When people start to work with PostgreSQL, especially when they are used to Oracle, some things might be very confusing. A few of the questions we usually get asked are: Where is the listener and how can I configure it? When you talk about a PostgreSQL cluster where are the other nodes? Why do we [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-11T03:45:59+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\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=\"8 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\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/4bae5e5dd8c7d48edbd948772b49b202\"},\"headline\":\"What the hell are these template0 and template1 databases in PostgreSQL?\",\"datePublished\":\"2016-09-11T03:45:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/\"},\"wordCount\":1010,\"commentCount\":1,\"keywords\":[\"PostgreSQL\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/\",\"name\":\"What the hell are these template0 and template1 databases in PostgreSQL? - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2016-09-11T03:45:59+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/4bae5e5dd8c7d48edbd948772b49b202\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What the hell are these template0 and template1 databases in PostgreSQL?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"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\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/4bae5e5dd8c7d48edbd948772b49b202\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"caption\":\"Open source Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What the hell are these template0 and template1 databases in PostgreSQL? - dbi 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\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"What the hell are these template0 and template1 databases in PostgreSQL?","og_description":"When people start to work with PostgreSQL, especially when they are used to Oracle, some things might be very confusing. A few of the questions we usually get asked are: Where is the listener and how can I configure it? When you talk about a PostgreSQL cluster where are the other nodes? Why do we [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/","og_site_name":"dbi Blog","article_published_time":"2016-09-11T03:45:59+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Open source Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4bae5e5dd8c7d48edbd948772b49b202"},"headline":"What the hell are these template0 and template1 databases in PostgreSQL?","datePublished":"2016-09-11T03:45:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/"},"wordCount":1010,"commentCount":1,"keywords":["PostgreSQL"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/","url":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/","name":"What the hell are these template0 and template1 databases in PostgreSQL? - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-09-11T03:45:59+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4bae5e5dd8c7d48edbd948772b49b202"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/what-the-hell-are-these-template0-and-template1-databases-in-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What the hell are these template0 and template1 databases in PostgreSQL?"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","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":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/4bae5e5dd8c7d48edbd948772b49b202","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","caption":"Open source Team"},"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\/8831","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=8831"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8831\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=8831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=8831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=8831"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=8831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}