
{"id":5743,"date":"2024-06-19T12:19:40","date_gmt":"2024-06-19T12:19:40","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=5743"},"modified":"2024-06-19T12:19:42","modified_gmt":"2024-06-19T12:19:42","slug":"postgresql-automatic-failover-with-repmgr","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/","title":{"rendered":"\u00a0PostgreSQL Automatic failover with repmgr"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Welcome to our latest blog!! In today&#8217;s world of distributed databases, ensuring high availability and reliability is paramount. This blog explores the crucial concepts of automatic failover and switchover using <code>repmgr<\/code>, a popular tool for managing replication and failover in <code>PostgreSQL<\/code> environments. We know how important it is for the crucial sectors like  banking to have a HA solution for their PODS, with PostgreSQL. In the previous <a href=\"https:\/\/test.opensource-db.in\/wp1\/setting-up-high-availability-with-repmgr\/\">blog<\/a> , we have seen the designing and implementation part of the HA systems but now we will look into the automatic failover and switchover part of the story. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Automatic failover<\/strong> is a critical feature in database systems that ensures minimal downtime in the event of a primary server failure. When the primary node becomes unavailable due to hardware failure, network issues, or other reasons, an automatic failover mechanism seamlessly promotes a standby node to become the new primary node. This transition happens automatically without manual intervention, thereby reducing downtime and ensuring continuous service availability.&nbsp;Here are the detailed process of achieving HA and also retaining old primary back. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">step1: check the daemon status<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@node1 ~]$ \/usr\/pgsql-15\/bin\/repmgr -f \/var\/lib\/pgsql\/repmgr.conf daemon status\nWARNING: the following problems were found in the configuration file:\n  parameter \"cluster\" is deprecated and will be ignored\n ID | Name    | Role    | Status    | Upstream | repmgrd | PID  | Paused? | Upstream last seen\n----+---------+---------+-----------+----------+---------+------+---------+--------------------\n 1  | node1   | standby |   running | standby | running | 1641 | no      | 0 second(s) ago    \n 2  | standby | primary | * running |          | running | 1716 | no      | n\/a            <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We are able to see the both primary and standby running the daemon status<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step2 : Stopping the Primary Server<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Stop the primary PostgreSQL server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres@node1 ~]$ \/usr\/pgsql-15\/bin\/pg_ctl stop -D \/var\/lib\/pgsql\/15\/data\/\nwaiting for server to shut down.... done\nserver stopped<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Confirms the server shutdown.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3:Check the Cluster show&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">checking the cluster show on the standby server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@node1 ~]$ \/usr\/pgsql-15\/bin\/repmgr -f \/var\/lib\/pgsql\/repmgr.conf  cluster show\nWARNING: the following problems were found in the configuration file:\n  parameter \"cluster\" is deprecated and will be ignored\n ID | Name    | Role    | Status        | Upstream  | Location | Priority | Timeline | Connection string                                                               \n----+---------+---------+---------------+-----------+----------+----------+----------+----------------------------------------------------------------------------------\n 1  | node1   | standby |   running     | ? standby | default  | 100      | 2        | host=192.168.232.150 user=repmgr dbname=repmgr password=repmgr connect_timeout=2\n 2  | standby | primary | ? unreachable | ?         | default  | 100      |          | host=192.168.232.151 user=repmgr dbname=repmgr password=repmgr connect_timeout=2\n\nWARNING: following issues were detected\n  - unable to connect to node \"node1\" (ID: 1)'s upstream node \"standby\" (ID: 2)\n  - unable to determine if node \"node1\" (ID: 1) is attached to its upstream node \"standby\" (ID: 2)\n  - unable to connect to node \"standby\" (ID: 2)\n  - node \"standby\" (ID: 2) is registered as an active primary but is unreachable\n\nHINT: execute with --verbose option to see connection error messages<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Node &#8220;standby&#8221; (ID: 2) is registered as an active primary but is unreachable<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&nbsp;&nbsp;Step 4 : Restarting the old primary and checking cluster<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@standby ~]$ \/usr\/pgsql-15\/bin\/repmgr -f \/var\/lib\/pgsql\/repmgr.conf cluster show\n ID | Name    | Role    | Status               | Upstream | Location | Priority | Timeline | Connection string                                                               \n----+---------+---------+----------------------+----------+----------+----------+----------+----------------------------------------------------------------------------------\n 1  | node1   | standby | ! running as primary |          | default  | 100      | 3        | host=192.168.232.150 user=repmgr dbname=repmgr password=repmgr connect_timeout=2\n 2  | standby | primary | * running            |          | default  | 100      | 2        | host=192.168.232.151 user=repmgr dbname=repmgr password=repmgr connect_timeout=2\n\nWARNING: following issues were detected\n  - node \"node1\" (ID: 1) is registered as standby but running as primary\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">&nbsp;Step5 : Converting old primary to standby clone<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Stop the old primary server to perform this activity.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@standby ~]$ \/usr\/pgsql-15\/bin\/repmgr -h 192.168.232.150 -U repmgr -d repmgr -f \/var\/lib\/pgsql\/repmgr.conf standby clone --dry-run\nNOTICE: destination directory \"\/var\/lib\/pgsql\/15\/data\" provided\nINFO: connecting to source node\nDETAIL: connection string is: host=192.168.232.150 user=repmgr dbname=repmgr\nDETAIL: current installation size is 30 MB\nINFO: \"repmgr\" extension is installed in database \"repmgr\"\nWARNING: target data directory appears to be a PostgreSQL data directory\nDETAIL: target data directory is \"\/var\/lib\/pgsql\/15\/data\"\nHINT: use -F\/--force to overwrite the existing data directory\nINFO: replication slot usage not requested;  no replication slot will be set up for this standby\nINFO: parameter \"max_wal_senders\" set to 10\nNOTICE: checking for available walsenders on the source node (2 required)\nINFO: sufficient walsenders available on the source node\nDETAIL: 2 required, 10 available\nNOTICE: checking replication connections can be made to the source server (2 required)\nINFO: required number of replication connections could be made to the source server\nDETAIL: 2 replication connections required\nWARNING: data checksums are not enabled and \"wal_log_hints\" is \"off\"\nDETAIL: pg_rewind requires \"wal_log_hints\" to be enabled\nNOTICE: standby will attach to upstream node 1\nHINT: consider using the -c\/--fast-checkpoint option\nINFO: would execute:\n  \/usr\/pgsql-15\/bin\/pg_basebackup -l \"repmgr base backup\"  -D \/var\/lib\/pgsql\/15\/data -h 192.168.232.150 -p 5432 -U repmgr -X stream \nINFO: all prerequisites for \"standby clone\" are met<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Confirms prerequisites for standby clone.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@standby ~]$ \/usr\/pgsql-15\/bin\/repmgr -h 192.168.232.150 -U repmgr -d repmgr -f \/var\/lib\/pgsql\/repmgr.conf standby clone -F\nNOTICE: destination directory \"\/var\/lib\/pgsql\/15\/data\" provided\nINFO: connecting to source node\nDETAIL: connection string is: host=192.168.232.150 user=repmgr dbname=repmgr\nDETAIL: current installation size is 30 MB\nINFO: replication slot usage not requested;  no replication slot will be set up for this standby\nNOTICE: checking for available walsenders on the source node (2 required)\nNOTICE: checking replication connections can be made to the source server (2 required)\nWARNING: data checksums are not enabled and \"wal_log_hints\" is \"off\"\nDETAIL: pg_rewind requires \"wal_log_hints\" to be enabled\nWARNING: directory \"\/var\/lib\/pgsql\/15\/data\" exists but is not empty\nNOTICE: -F\/--force provided - deleting existing data directory \"\/var\/lib\/pgsql\/15\/data\"\nNOTICE: starting backup (using pg_basebackup)...\nHINT: this may take some time; consider using the -c\/--fast-checkpoint option\nINFO: executing:\n  \/usr\/pgsql-15\/bin\/pg_basebackup -l \"repmgr base backup\"  -D \/var\/lib\/pgsql\/15\/data -h 192.168.232.150 -p 5432 -U repmgr -X stream \nNOTICE: standby clone (using pg_basebackup) complete\nNOTICE: you can now start your PostgreSQL server\nHINT: for example: pg_ctl -D \/var\/lib\/pgsql\/15\/data start\nHINT: after starting the server, you need to re-register this standby with \"repmgr standby register --force\" to update the existing node record<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Completes the standby clone process.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 6: Starting the New Standby Server<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@standby ~]$ \/usr\/pgsql-15\/bin\/pg_ctl -D \/var\/lib\/pgsql\/15\/data start\nwaiting for server to start....2024-06-19 12:09:05.620 IST &#091;4644] LOG:  redirecting log output to logging collector process\n2024-06-19 12:09:05.620 IST &#091;4644] HINT:  Future log output will appear in directory \"log\".\n done\nserver started<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Confirms the server has started.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 7: Registering the New Standby<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@standby ~]$ \/usr\/pgsql-15\/bin\/repmgr -f \/var\/lib\/pgsql\/repmgr.conf standby register -F\nINFO: connecting to local node \"standby\" (ID: 2)\nINFO: connecting to primary database\nINFO: standby registration complete\nNOTICE: standby node \"standby\" (ID: 2) successfully registered\nStandby registration is complete and successful.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the cluster status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres@standby ~]$ \/usr\/pgsql-15\/bin\/repmgr -f \/var\/lib\/pgsql\/repmgr.conf cluster show\n ID | Name    | Role    | Status    | Upstream | Location | Priority | Timeline | Connection string                                                               \n----+---------+---------+-----------+----------+----------+----------+----------+----------------------------------------------------------------------------------\n 1  | node1   | primary | * running |          | default  | 100      | 3        | host=192.168.232.150 user=repmgr dbname=repmgr password=repmgr connect_timeout=2\n 2  | standby | standby |   running | node1    | default  | 100      | 3        | host=192.168.232.151 user=repmgr dbname=repmgr password=repmgr connect_timeout=2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8: Performing a Switchover<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Switch roles between primary and standby server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@localhost data]$ \/usr\/pgsql-15\/bin\/repmgr -f \/var\/lib\/pgsql\/repmgr.conf standby switchover --always-promote\nNOTICE: executing switchover on node \"standby\" (ID: 2)\nNOTICE: attempting to pause repmgrd on 2 nodes\nNOTICE: local node \"standby\" (ID: 2) will be promoted to primary; current primary \"node1\" (ID: 1) will be demoted to standby\nNOTICE: stopping current primary node \"node1\" (ID: 1)\nNOTICE: issuing CHECKPOINT on node \"node1\" (ID: 1) \nDETAIL: executing server command \"\/usr\/pgsql-15\/bin\/pg_ctl  -D '\/var\/lib\/pgsql\/15\/data' -W -m fast stop\"\nINFO: checking for primary shutdown; 1 of 60 attempts (\"shutdown_check_timeout\")\nINFO: checking for primary shutdown; 2 of 60 attempts (\"shutdown_check_timeout\")\nNOTICE: current primary has been cleanly shut down at location 0\/27000028\nNOTICE: promoting standby to primary\nDETAIL: promoting server \"standby\" (ID: 2) using pg_promote()\nNOTICE: waiting up to 60 seconds (parameter \"promote_check_timeout\") for promotion to complete\nNOTICE: STANDBY PROMOTE successful\nDETAIL: server \"standby\" (ID: 2) was successfully promoted to primary\nNOTICE: node \"standby\" (ID: 2) promoted to primary, node \"node1\" (ID: 1) demoted to standby\nNOTICE: switchover was successful\nDETAIL: node \"standby\" is now primary and node \"node1\" is attached as standby\nNOTICE: STANDBY SWITCHOVER has completed successfully<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Standby promoted to primary, and node1 demoted to standby. Switchover successful<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 9: Final Cluster Status Check<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;postgres@localhost data]$ \/usr\/pgsql-15\/bin\/repmgr -f \/var\/lib\/pgsql\/repmgr.conf cluster show\n ID | Name | Role    | Status    | Upstream | Location | Priority | Timeline | Connection string                                              \n----+------+---------+-----------+----------+----------+----------+----------+-----------------------------------------------------------------\n 1  | node1  | standby |   running | standby    | default  | 100      | 7        |host=192.168.232.150 user=repmgr dbname=repmgr password=repmgr connect_timeout=2\n 2  | standby  | primary | * running |          | default  | 100      | 8        | host=192.168.232.151 user=repmgr dbname=repmgr password=repmgr  connect_timeout=2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">node1 is now the standby and standby is now the primary.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Knowing the important of having a HA systems for their PODs, with <code>PostgreSQL<\/code> and using a tool like <code>repmgr<\/code> will be asset to the organization . In this blog , we have performed automatic failover by detecting failure of the primary and promoting the most suitable standby without any manual intervention. And also process of retaining the old primary to standby later to primary again is a must important to know for the DBA&#8217;s.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you and stay tuned!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Welcome to our latest blog!! In today&#8217;s world of distributed databases, ensuring high availability and reliability is paramount. This [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":5752,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1,23],"tags":[],"class_list":["post-5743","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-others","category-postgresql-14"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u00a0PostgreSQL Automatic failover with repmgr - 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=\"\u00a0PostgreSQL Automatic failover with repmgr - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"Introduction Welcome to our latest blog!! In today&#8217;s world of distributed databases, ensuring high availability and reliability is paramount. This [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/\" \/>\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=\"2024-06-19T12:19:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-19T12:19:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.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\/postgresql-automatic-failover-with-repmgr\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/\"},\"author\":{\"name\":\"Shameer Bhupathi\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\"},\"headline\":\"\u00a0PostgreSQL Automatic failover with repmgr\",\"datePublished\":\"2024-06-19T12:19:40+00:00\",\"dateModified\":\"2024-06-19T12:19:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/\"},\"wordCount\":412,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png\",\"articleSection\":[\"Others\",\"PostgreSQL 14\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/\",\"name\":\"\u00a0PostgreSQL Automatic failover with repmgr - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png\",\"datePublished\":\"2024-06-19T12:19:40+00:00\",\"dateModified\":\"2024-06-19T12:19:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png\",\"width\":1800,\"height\":945},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u00a0PostgreSQL Automatic failover with repmgr\"}]},{\"@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":"\u00a0PostgreSQL Automatic failover with repmgr - 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":"\u00a0PostgreSQL Automatic failover with repmgr - OpenSource DB","og_description":"Introduction Welcome to our latest blog!! In today&#8217;s world of distributed databases, ensuring high availability and reliability is paramount. This [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2024-06-19T12:19:40+00:00","article_modified_time":"2024-06-19T12:19:42+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.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\/postgresql-automatic-failover-with-repmgr\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/"},"author":{"name":"Shameer Bhupathi","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5"},"headline":"\u00a0PostgreSQL Automatic failover with repmgr","datePublished":"2024-06-19T12:19:40+00:00","dateModified":"2024-06-19T12:19:42+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/"},"wordCount":412,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png","articleSection":["Others","PostgreSQL 14"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/","url":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/","name":"\u00a0PostgreSQL Automatic failover with repmgr - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png","datePublished":"2024-06-19T12:19:40+00:00","dateModified":"2024-06-19T12:19:42+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png","width":1800,"height":945},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-automatic-failover-with-repmgr\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"\u00a0PostgreSQL Automatic failover with repmgr"}]},{"@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\/2024\/06\/image-1-1.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1-1.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\/business\/others\/\" rel=\"category tag\">Others<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-14\/\" rel=\"category tag\">PostgreSQL 14<\/a>","rttpg_excerpt":"Introduction Welcome to our latest blog!! In today&#8217;s world of distributed databases, ensuring high availability and reliability is paramount. This [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5743","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=5743"}],"version-history":[{"count":4,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5743\/revisions"}],"predecessor-version":[{"id":5749,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5743\/revisions\/5749"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/5752"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=5743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=5743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=5743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}