{"id":49654,"date":"2022-06-04T16:28:00","date_gmt":"2022-06-04T16:28:00","guid":{"rendered":"https:\/\/dbtut.com\/?p=49654"},"modified":"2022-06-04T16:38:07","modified_gmt":"2022-06-04T16:38:07","slug":"how-to-create-a-postgresql-cluster-with-patroni","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/","title":{"rendered":"How To Create A PostgreSQL Cluster With Patroni"},"content":{"rendered":"<p>Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system.<\/p>\n<p>First of all, we will need 4 virtual servers with Centos 7 installed. You can access Centos 7 installation from the link below.<\/p>\n<pre class=\"lang:default decode:true \">https:\/\/dbtut.com\/index.php\/2022\/02\/13\/centos-7-installation\/<\/pre>\n<pre class=\"lang:default decode:true \">HOSTNAME\tIP ADDRESS\t\r\npg_node1        192.168.1.18    Patroni ve PostgreSQL          \r\npg_node2        192.168.1.19    Patroni ve PostgreSQL\r\netcd            192.168.1.20    ETCD Server\r\nhaproxy         192.168.1.21    HA Proxy<\/pre>\n<p>2. We install the epel repo on all our servers.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo yum -y install epel-release\r\n$ sudo yum -y install centos-release-scl-rh\r\n$ sudo yum -y update<\/pre>\n<p>3. Then we restart our servers.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo shutdown -r now\r\n<\/pre>\n<p>4. Install PostgreSQL 12 on pg_node1 and pg_node2.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo yum -y install https:\/\/download.postgresql.org\/pub\/repos\/yum\/reporpms\/EL-7-x86_64\/pgdg-redhat-repo-latest.noarch.rpm\r\n$ sudo yum -y install postgresql12-server postgresql12 postgresql12-devel<\/pre>\n<p>5. We install Patroni on pg_node1 and pg_node2.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo yum -y install https:\/\/github.com\/cybertec-postgresql\/patroni-packaging\/releases\/download\/1.6.5-1\/patroni-1.6.5-1.rhel7.x86_64.rpm\r\n<\/pre>\n<p>6. We create a config file for Patroni on pg_node1 and pg_node2.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo cp -p \/opt\/app\/patroni\/etc\/postgresql.yml.sample \/opt\/app\/patroni\/etc\/postgresql.yml\r\n<\/pre>\n<p>We enter the configuration file with vi and edit it as follows.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo vi \/opt\/app\/patroni\/etc\/postgresql.yml\r\n<\/pre>\n<h4>For pg_node1 :<\/h4>\n<pre class=\"lang:default decode:true \">scope: postgres\r\nnamespace: \/pg_cluster\/\r\nname: pg_node1\r\nrestapi:\r\n  listen: 192.168.1.18:8008\r\n  connect_address: 192.168.1.18:8008\r\netcd:\r\n  host: 192.168.1.20:2379\r\nbootstrap:\r\n  dcs:\r\n    ttl: 30\r\n    loop_wait: 10\r\n    retry_timeout: 10\r\n    maximum_lag_on_failover: 1048576\r\n    postgresql:\r\n      use_pg_rewind: true\r\n      use_slots: true\r\ninitdb: \r\n  - encoding: UTF8\r\n  - data-checksums\r\npg_hba: \r\n  - host replication replicator 127.0.0.1\/32 md5\r\n  - host replication replicator 192.168.1.18\/0 md5\r\n  - host replication replicator 192.168.1.19\/0 md5\r\n  - host all all 0.0.0.0\/0 md5\r\nusers:\r\n    admin:\r\n      password: admin\r\n      options:\r\n        - createrole\r\n        - createdb\r\npostgresql:\r\n  listen: 192.168.1.18:5432\r\n  connect_address: 192.168.1.18:5432\r\n  data_dir: \/var\/lib\/pgsql\/12\/data\r\n  bin_dir: \/usr\/pgsql-12\/bin\r\n  pgpass: \/tmp\/pgpass\r\n  authentication:\r\n    replication:\r\n      username: replicator\r\n      password: replicator\r\n    superuser:\r\n      username: postgres\r\n      password: postgres\r\ntags:\r\n    nofailover: false\r\n    noloadbalance: false\r\n    clonefrom: false\r\n    nosync: false<\/pre>\n<h4>For pg_node2:<\/h4>\n<pre class=\"lang:default decode:true \">scope: postgres\r\nnamespace: \/pg_cluster\/\r\nname: pg_node2\r\nrestapi:\r\n  listen: 192.168.1.19:8008\r\n  connect_address: 192.168.1.19:8008\r\netcd:\r\n  host: 192.168.1.20:2379\r\nbootstrap:\r\n  dcs:\r\n    ttl: 30\r\n    loop_wait: 10\r\n    retry_timeout: 10\r\n    maximum_lag_on_failover: 1048576\r\n    postgresql:\r\n      use_pg_rewind: true\r\n      use_slots: true\r\ninitdb: \r\n  - encoding: UTF8\r\n  - data-checksums\r\npg_hba:  \r\n  - host replication replicator 127.0.0.1\/32 md5\r\n  - host replication replicator 192.168.1.18\/0 md5\r\n  - host replication replicator 192.168.1.19\/0 md5\r\n  - host all all 0.0.0.0\/0 md5\r\nusers:\r\n    admin:\r\n      password: admin\r\n      options:\r\n        - createrole\r\n        - createdb\r\npostgresql:\r\n  listen: 192.168.1.19:5432\r\n  connect_address: 192.168.1.19:5432\r\n  data_dir: \/var\/lib\/pgsql\/12\/data\r\n  bin_dir: \/usr\/pgsql-12\/bin\r\n  pgpass: \/tmp\/pgpass\r\n  authentication:\r\n    replication:\r\n      username: replicator\r\n      password: replicator\r\n    superuser:\r\n      username: postgres\r\n      password: postgres\r\ntags:\r\n    nofailover: false\r\n    noloadbalance: false\r\n    clonefrom: false\r\n    nosync: false<\/pre>\n<p>7. We install etcd on the etcd server.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo yum -y install etcd\r\n<\/pre>\n<p>8. After the installation is finished, we make the following changes in the configuration file.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo vi \/etc\/etcd\/etcd.conf\r\n \r\n[Member]\r\nETCD_LISTEN_PEER_URLS=\"http:\/\/192.168.1.20:2380,http:\/\/localhost:2380\"\r\nETCD_LISTEN_CLIENT_URLS=\"http:\/\/192.168.1.20:2379,http:\/\/localhost:2379\"\r\n[Clustering]\r\nETCD_INITIAL_ADVERTISE_PEER_URLS=\"http:\/\/192.168.1.20:2380\"\r\nETCD_ADVERTISE_CLIENT_URLS=\"http:\/\/192.168.1.20:2379\"\r\nETCD_INITIAL_CLUSTER=\"default=http:\/\/192.168.1.20:2380\"\r\nETCD_INITIAL_CLUSTER_TOKEN=\"etcd-cluster\"\r\nETCD_INITIAL_CLUSTER_STATE=\"new\"\r\n<\/pre>\n<p>9. We start the etcd service.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo systemctl enable etcd\r\n$ sudo systemctl start etcd\r\n$ sudo systemctl status etcd<\/pre>\n<figure style=\"width: 1400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1400\/1*9yEqQtORxKUDi_92sgQfhQ.png\" alt=\"\" width=\"1400\" height=\"336\" \/><figcaption class=\"wp-caption-text\">etcd service status<\/figcaption><\/figure>\n<p>10. After starting the etcd service, we start the Patroni service in pg_node1 and pg_node2.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo systemctl enable patroni\r\n$ sudo systemctl start patroni\r\n$ sudo systemctl status patroni<\/pre>\n<p id=\"c7cf\" class=\"pw-post-body-paragraph jt ju iw jv b jw jx jy jz ka kb kc kd ke kf kg kh ki kj kk kl km kn ko kp kq ip fy\" data-selectable-paragraph=\"\">pg_node1 :<\/p>\n<figure style=\"width: 1400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1400\/1*wnVdi_9LscHOmNEStkm4ig.png\" alt=\"\" width=\"1400\" height=\"485\" \/><figcaption class=\"wp-caption-text\">pg_node1 patroni status<\/figcaption><\/figure>\n<div tabindex=\"0\" role=\"button\"><\/div>\n<div class=\"lu lv dq lw cf lx\" tabindex=\"0\" role=\"button\">pg_node2 :<\/div>\n<div tabindex=\"0\" role=\"button\"><\/div>\n<div tabindex=\"0\" role=\"button\">\n<figure style=\"width: 1400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1400\/1*dJa8eUvwB9wLXV5Xdwij1w.png\" alt=\"\" width=\"1400\" height=\"453\" \/><figcaption class=\"wp-caption-text\">pg_node2 patroni status<\/figcaption><\/figure>\n<p>11. We install HAProxy on the haproxy server.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo yum -y install haproxy\r\n<\/pre>\n<p>12. After the installation is finished, the configuration file is backed up and arranged as follows.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo cp -p \/etc\/haproxy\/haproxy.cfg \/etc\/haproxy\/haproxy.cfg_old\r\n$ sudo vi \/etc\/haproxy\/haproxy.cfg\r\nglobal\r\n    log         127.0.0.1 local2\r\n    chroot      \/var\/lib\/haproxy\r\n    pidfile     \/var\/run\/haproxy.pid\r\n    maxconn     4000\r\n    user        haproxy\r\n    group       haproxy\r\n    daemon\r\n    stats socket \/var\/lib\/haproxy\/stats\r\ndefaults\r\n    mode                    tcp\r\n    log                     global\r\n    option                  httplog\r\n    option                  dontlognull\r\n    option http-server-close\r\n    option forwardfor       except 127.0.0.0\/8\r\n    option                  redispatch\r\n    retries                 3\r\n    timeout http-request    10s\r\n    timeout queue           1m\r\n    timeout connect         4s\r\n    timeout client          30m\r\n    timeout server          30m\r\n    timeout http-keep-alive 10s\r\n    timeout check           5s\r\n    maxconn                 3000\r\nlisten stats\r\n    mode http\r\n    bind *:7000\r\n    stats enable\r\n    stats uri \/\r\nlisten postgres\r\n    bind *:5000\r\n    option httpchk\r\n    http-check expect status 200\r\n    default-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions\r\n    server pg_node1 192.168.1.18:5432 maxconn 1000 check port 8008\r\n    server pg_node2 192.168.1.19:5432 maxconn 1000 check port 8008<\/pre>\n<p>13. We start the HAProxy service.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo systemctl start haproxy\r\n$ sudo systemctl enable haproxy\r\n$ sudo systemctl status haproxy<\/pre>\n<figure style=\"width: 1282px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1400\/1*l0eX6SJei58L1EMbwdQQww.png\" alt=\"\" width=\"1282\" height=\"180\" \/><figcaption class=\"wp-caption-text\">HAProxy service status<\/figcaption><\/figure>\n<p>If the HAProxy service cannot be started, we can check the errors in the configuration file with the following command.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo haproxy -c -V -f \/etc\/haproxy\/haproxy.cfg\r\n<\/pre>\n<p>When we open the address http:\/\/192.168.1.21:7000 in the browser, we will see a haproxy panel like the one below. As can be seen here, pg_node1 is the master and pg_node2 is the slave.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/miro.medium.com\/max\/1400\/1*cdMY1QQyTbB7A98TdsLM_g.png\" \/><\/p>\n<p id=\"wWSmPYM\">We can also check the cluster status, role and members with the following command.<\/p>\n<pre class=\"lang:default decode:true \">$ sudo patronictl -c \/opt\/app\/patroni\/etc\/postgresql.yml list\r\n<\/pre>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/miro.medium.com\/max\/1184\/1*mT01rx6hseN702jNznQOxQ.png\" \/><\/p>\n<p>We have completed the cluster setup with Patroni. See you in my other articles.<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_49654\" class=\"pvc_stats all  \" data-element-id=\"49654\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system. First of all, we will need 4 virtual servers with Centos 7 installed. You can access Centos 7 installation from the link below. https:\/\/dbtut.com\/index.php\/2022\/02\/13\/centos-7-installation\/ HOSTNAME IP ADDRESS pg_node1 192.168.1.18 Patroni ve PostgreSQL &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_49654\" class=\"pvc_stats all  \" data-element-id=\"49654\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":3068,"featured_media":49679,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-49654","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-postgres"],"aioseo_notices":[],"a3_pvc":{"activated":true,"total_views":2553,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Create A PostgreSQL Cluster With Patroni - Database Tutorials<\/title>\n<meta name=\"description\" content=\"Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Create A PostgreSQL Cluster With Patroni - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-04T16:28:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-04T16:38:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png\" \/>\n\t<meta property=\"og:image:width\" content=\"807\" \/>\n\t<meta property=\"og:image:height\" content=\"383\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Melek Durdu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Melek Durdu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/\"},\"author\":{\"name\":\"Melek Durdu\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/f9c7aff3fe68fef0255caa38a944ce4b\"},\"headline\":\"How To Create A PostgreSQL Cluster With Patroni\",\"datePublished\":\"2022-06-04T16:28:00+00:00\",\"dateModified\":\"2022-06-04T16:38:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/\"},\"wordCount\":307,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png\",\"articleSection\":[\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/\",\"name\":\"How To Create A PostgreSQL Cluster With Patroni - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png\",\"datePublished\":\"2022-06-04T16:28:00+00:00\",\"dateModified\":\"2022-06-04T16:38:07+00:00\",\"description\":\"Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system.\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png\",\"width\":807,\"height\":383},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Create A PostgreSQL Cluster With Patroni\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/f9c7aff3fe68fef0255caa38a944ce4b\",\"name\":\"Melek Durdu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/58ca612f54e80376df00d6a004a13776cc9d0e2fe204974ec63003d803c26896?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/58ca612f54e80376df00d6a004a13776cc9d0e2fe204974ec63003d803c26896?s=96&d=mm&r=g\",\"caption\":\"Melek Durdu\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/melekdurdu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Create A PostgreSQL Cluster With Patroni - Database Tutorials","description":"Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system.","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:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/","og_locale":"en_US","og_type":"article","og_title":"How To Create A PostgreSQL Cluster With Patroni - Database Tutorials","og_description":"Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system.","og_url":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/","og_site_name":"Database Tutorials","article_published_time":"2022-06-04T16:28:00+00:00","article_modified_time":"2022-06-04T16:38:07+00:00","og_image":[{"width":807,"height":383,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png","type":"image\/png"}],"author":"Melek Durdu","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Melek Durdu","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/"},"author":{"name":"Melek Durdu","@id":"https:\/\/dbtut.com\/#\/schema\/person\/f9c7aff3fe68fef0255caa38a944ce4b"},"headline":"How To Create A PostgreSQL Cluster With Patroni","datePublished":"2022-06-04T16:28:00+00:00","dateModified":"2022-06-04T16:38:07+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/"},"wordCount":307,"commentCount":1,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png","articleSection":["PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/","url":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/","name":"How To Create A PostgreSQL Cluster With Patroni - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png","datePublished":"2022-06-04T16:28:00+00:00","dateModified":"2022-06-04T16:38:07+00:00","description":"Today I will tell you How To Create A PostgreSQL Cluster With Patroni. I will be using Centos 7 as the operating system.","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2022\/06\/Ekran-goruntusu-2022-06-04-193739.png","width":807,"height":383},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2022\/06\/04\/how-to-create-a-postgresql-cluster-with-patroni\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"How To Create A PostgreSQL Cluster With Patroni"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/f9c7aff3fe68fef0255caa38a944ce4b","name":"Melek Durdu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/58ca612f54e80376df00d6a004a13776cc9d0e2fe204974ec63003d803c26896?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/58ca612f54e80376df00d6a004a13776cc9d0e2fe204974ec63003d803c26896?s=96&d=mm&r=g","caption":"Melek Durdu"},"url":"https:\/\/dbtut.com\/index.php\/author\/melekdurdu\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/49654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/3068"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=49654"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/49654\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/49679"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=49654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=49654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=49654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}