{"id":10040,"date":"2021-01-12T13:02:02","date_gmt":"2021-01-12T12:02:02","guid":{"rendered":"http:\/\/arumel.com\/?p=10040"},"modified":"2021-01-12T13:11:46","modified_gmt":"2021-01-12T12:11:46","slug":"preparacion-entorno-repmgr-y-postgresql-13-parte-2","status":"publish","type":"post","link":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/","title":{"rendered":"Preparaci\u00f3n entorno &#8211; Repmgr y Postgresql 13 (parte 2)"},"content":{"rendered":"<p><a href=\"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-1\">Ver configuraci\u00f3n parte1<\/a><\/p>\n<p>Registramos el primer nodo en el cluster:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres1 ~]$ <strong>repmgr primary register<\/strong><\/code><br \/>\n<code>INFO: connecting to primary database...<\/code><code><\/code><br \/>\n<code>NOTICE: attempting to install extension \"repmgr\"<\/code><br \/>\n<code>NOTICE: \"repmgr\" extension successfully installed<\/code><br \/>\n<code>NOTICE: primary node record (ID: 1) registered<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Mostramos el estado del cluster:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres1 ~]$ <strong>repmgr cluster show<\/strong><\/code><br \/>\n<code>ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string <\/code><br \/>\n<code>----+-----------+---------+-----------+----------+----------+----------+----------+----------------------------------------------<\/code><br \/>\n<code>1 | postgres1 | primary | * running | | default | 100 | 1 | host=192.168.0.101 user=repmgr dbname=repmgr<\/code><\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres1 ~]$ <strong>psql -U repmgr -d repmgr -h 192.168.0.101 -c \"SELECT * FROM repmgr.nodes\"<\/strong><\/code><br \/>\n<code>node_id | upstream_node_id | active | node_name | type | location | priority | conninfo | repluser | slot_name | config_file <\/code><br \/>\n<code>---------+------------------+--------+-----------+---------+----------+----------+----------------------------------------------+----------+---------------+----------------------------<\/code><br \/>\n<code>1 | | t | postgres1 | primary | default | 100 | host=192.168.0.101 user=repmgr dbname=repmgr | repmgr | repmgr_slot_1 | \/etc\/repmgr\/13\/repmgr.conf<\/code><br \/>\n<code>(1 row)<\/code><\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres1 ~]$ <strong>repmgr node status<\/strong><\/code><br \/>\n<code>Node \"postgres1\":<\/code><br \/>\n<code>PostgreSQL version: 13.1<\/code><br \/>\n<code>Total data size: 31 MB<\/code><br \/>\n<code>Conninfo: host=192.168.0.101 user=repmgr dbname=repmgr<\/code><br \/>\n<code>Role: primary<\/code><br \/>\n<code>WAL archiving: enabled<\/code><br \/>\n<code>Archive command: \/bin\/true<\/code><br \/>\n<code>WALs pending archiving: 0 pending files<\/code><br \/>\n<code>Replication connections: 0 (of maximal 10)<\/code><br \/>\n<code>Replication slots: 0 physical (of maximal 10; 0 missing)<\/code><br \/>\n<code>Replication lag: n\/a<\/code><\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres1 ~]$ <strong>repmgr node check<\/strong><\/code><br \/>\n<code>Node \"postgres1\":<\/code><br \/>\n<code>Server role: OK (node is primary)<\/code><br \/>\n<code>Replication lag: OK (N\/A - node is primary)<\/code><br \/>\n<code>WAL archiving: OK (0 pending archive ready files)<\/code><br \/>\n<code>Upstream connection: OK (N\/A - node is primary)<\/code><br \/>\n<code>Downstream servers: OK (this node has no downstream nodes)<\/code><br \/>\n<code>Replication slots: OK (node has no physical replication slots)<\/code><br \/>\n<code>Missing physical replication slots: OK (node has no missing physical replication slots)<\/code><br \/>\n<code>Configured data directory: OK (configured \"data_directory\" is \"\/var\/lib\/pgsql\/13\/data\")<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Ahora clonamos la base de datos primary (postgres1) a la secondary (postgres2):<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres2 ~]$ <strong>repmgr -h 192.168.0.101 -U repmgr -d repmgr standby clone --fast-checkpoint<\/strong><\/code><br \/>\n<code>NOTICE: destination directory \"\/var\/lib\/pgsql\/13\/data\" provided<\/code><br \/>\n<code>INFO: connecting to source node<\/code><br \/>\n<code>DETAIL: connection string is: host=192.168.0.101 user=repmgr dbname=repmgr<\/code><br \/>\n<code>DETAIL: current installation size is 31 MB<\/code><br \/>\n<code>NOTICE: checking for available walsenders on the source node (2 required)<\/code><br \/>\n<code>NOTICE: checking replication connections can be made to the source server (2 required)<\/code><br \/>\n<code>INFO: checking and correcting permissions on existing directory \"\/var\/lib\/pgsql\/13\/data\"<\/code><br \/>\n<code>INFO: creating replication slot as user \"repmgr\"<\/code><br \/>\n<code>NOTICE: starting backup (using pg_basebackup)...<\/code><br \/>\n<code>INFO: executing:<\/code><br \/>\n<code>\/usr\/pgsql-13\/bin\/pg_basebackup -l \"repmgr base backup\" -D \/var\/lib\/pgsql\/13\/data -h 192.168.0.101 -p 5432 -U repmgr -c fast -X stream -S repmgr_slot_2 <\/code><br \/>\n<code>NOTICE: standby clone (using pg_basebackup) complete<\/code><br \/>\n<code>NOTICE: you can now start your PostgreSQL server<\/code><br \/>\n<code>HINT: for example: sudo \/bin\/systemctl start postgresql-13<\/code><br \/>\n<code>HINT: after starting the server, you need to register this standby with \"repmgr standby register\"<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Arrancamos la instancia:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres2 ~]$ sudo systemctl start postgresql-13<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Registramos la secondary en el cluster:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres2 ~]$ <strong>repmgr standby register<\/strong><\/code><br \/>\n<code>INFO: connecting to local node \"postgres2\" (ID: 2)<\/code><br \/>\n<code>INFO: connecting to primary database<\/code><br \/>\n<code>WARNING: --upstream-node-id not supplied, assuming upstream node is primary (node ID 1)<\/code><br \/>\n<code>INFO: standby registration complete<\/code><br \/>\n<code>NOTICE: standby node \"postgres2\" (ID: 2) successfully registered<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Configuraci\u00f3n del cluster actual:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres2 ~]$ <strong>repmgr cluster show<\/strong><\/code><br \/>\n<code>ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string <\/code><br \/>\n<code>----+-----------+---------+-----------+-----------+----------+----------+----------+----------------------------------------------<\/code><br \/>\n<code>1 | postgres1 | primary | * running | | default | 100 | 1 | host=192.168.0.101 user=repmgr dbname=repmgr<\/code><br \/>\n<code>2 | postgres2 | standby | running | postgres1 | default | 100 | 1 | host=192.168.0.102 user=repmgr dbname=repmgr<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Clonamos la segunda secondary (postgres3):<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres3 ~]$ <strong>repmgr -h 192.168.0.101 -U repmgr -d repmgr standby clone --fast-checkpoint<\/strong><\/code><br \/>\n<code>NOTICE: destination directory \"\/var\/lib\/pgsql\/13\/data\" provided<\/code><br \/>\n<code>INFO: connecting to source node<\/code><br \/>\n<code>DETAIL: connection string is: host=192.168.0.101 user=repmgr dbname=repmgr<\/code><br \/>\n<code>DETAIL: current installation size is 31 MB<\/code><br \/>\n<code>NOTICE: checking for available walsenders on the source node (2 required)<\/code><br \/>\n<code>NOTICE: checking replication connections can be made to the source server (2 required)<\/code><br \/>\n<code>INFO: checking and correcting permissions on existing directory \"\/var\/lib\/pgsql\/13\/data\"<\/code><br \/>\n<code>INFO: creating replication slot as user \"repmgr\"<\/code><br \/>\n<code>NOTICE: starting backup (using pg_basebackup)...<\/code><br \/>\n<code>INFO: executing:<\/code><br \/>\n<code>\/usr\/pgsql-13\/bin\/pg_basebackup -l \"repmgr base backup\" -D \/var\/lib\/pgsql\/13\/data -h 192.168.0.101 -p 5432 -U repmgr -c fast -X stream -S repmgr_slot_3 <\/code><br \/>\n<code>NOTICE: standby clone (using pg_basebackup) complete<\/code><br \/>\n<code>NOTICE: you can now start your PostgreSQL server<\/code><br \/>\n<code>HINT: for example: sudo \/bin\/systemctl start postgresql-13<\/code><br \/>\n<code>HINT: after starting the server, you need to register this standby with \"repmgr standby register\"<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Arrancamos la instancia:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres3 ~]$ sudo systemctl start postgresql-13<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Registramos la secondary (postgres3) contra la primary (postgres1) se podr\u00eda hacer sobre postgres2:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres3 ~]$ <strong>repmgr standby register<\/strong><\/code><br \/>\n<code>INFO: connecting to local node \"postgres3\" (ID: 3)<\/code><br \/>\n<code>INFO: connecting to primary database<\/code><br \/>\n<code>WARNING: --upstream-node-id not supplied, assuming upstream node is primary (node ID 1)<\/code><br \/>\n<code>INFO: standby registration complete<\/code><br \/>\n<code>NOTICE: standby node \"postgres3\" (ID: 3) successfully registered<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Y mostramos el estado del cluster:<\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres3 ~]$ <strong>repmgr cluster show<\/strong><\/code><br \/>\n<code>ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string <\/code><br \/>\n<code>----+-----------+---------+-----------+-----------+----------+----------+----------+----------------------------------------------<\/code><br \/>\n<code>1 | postgres1 | primary | * running | | default | 100 | 1 | host=192.168.0.101 user=repmgr dbname=repmgr<\/code><br \/>\n<code>2 | postgres2 | standby | running | postgres1 | default | 100 | 1 | host=192.168.0.102 user=repmgr dbname=repmgr<\/code><br \/>\n<code>3 | postgres3 | standby | running | postgres1 | default | 100 | 1 | host=192.168.0.103 user=repmgr dbname=repmgr<\/code><\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres1 ~]$ <strong>repmgr cluster matrix<\/strong><\/code><br \/>\n<code>INFO: connecting to database<\/code><br \/>\n<code>Name | ID | 1 | 2 | 3<\/code><br \/>\n<code>-----------+----+---+---+---<\/code><br \/>\n<code>postgres1 | 1 | * | * | * <\/code><br \/>\n<code>postgres2 | 2 | * | * | * <\/code><br \/>\n<code>postgres3 | 3 | * | * | *<\/code><\/p>\n<p style=\"padding-left: 40px\"><code>[postgres@postgres1 ~]$ <strong>repmgr cluster crosscheck<\/strong><\/code><br \/>\n<code>INFO: connecting to database<\/code><br \/>\n<code>Name | ID | 1 | 2 | 3<\/code><br \/>\n<code>-----------+----+---+---+---<\/code><br \/>\n<code>postgres1 | 1 | * | * | * <\/code><br \/>\n<code>postgres2 | 2 | * | * | * <\/code><br \/>\n<code>postgres3 | 3 | * | * | *<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Ver <a href=\"http:\/\/arumel.com\/es\/manual-switchover-repmgr-y-postgresql-13\">switchover<\/a> y <a href=\"https:\/\/arumel.com\/es\">failover<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ver configuraci\u00f3n parte1 Registramos el primer nodo en el cluster: [postgres@postgres1 ~]$ repmgr primary register INFO: connecting to primary database&#8230; NOTICE: attempting to install extension \u00abrepmgr\u00bb NOTICE: \u00abrepmgr\u00bb extension successfully installed NOTICE: primary node record (ID: 1) registered &nbsp; Mostramos el estado del cluster: [postgres@postgres1 ~]$ repmgr cluster show ID | Name | Role | [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[65],"tags":[434,433],"class_list":["post-10040","post","type-post","status-publish","format-standard","hentry","category-postgresql-es","tag-postgresql","tag-repmgr"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Preparaci\u00f3n entorno - Repmgr y Postgresql 13 (parte 2) - Arumel<\/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:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Preparaci\u00f3n entorno - Repmgr y Postgresql 13 (parte 2) - Arumel\" \/>\n<meta property=\"og:description\" content=\"Ver configuraci\u00f3n parte1 Registramos el primer nodo en el cluster: [postgres@postgres1 ~]$ repmgr primary register INFO: connecting to primary database... NOTICE: attempting to install extension &quot;repmgr&quot; NOTICE: &quot;repmgr&quot; extension successfully installed NOTICE: primary node record (ID: 1) registered &nbsp; Mostramos el estado del cluster: [postgres@postgres1 ~]$ repmgr cluster show ID | Name | Role | [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Arumel\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-12T12:02:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-12T12:11:46+00:00\" \/>\n<meta name=\"author\" content=\"sm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"sm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/\"},\"author\":{\"name\":\"sm\",\"@id\":\"http:\\\/\\\/arumel.com\\\/#\\\/schema\\\/person\\\/e270e777d900dcd47f8eb3895c076b64\"},\"headline\":\"Preparaci\u00f3n entorno &#8211; Repmgr y Postgresql 13 (parte 2)\",\"datePublished\":\"2021-01-12T12:02:02+00:00\",\"dateModified\":\"2021-01-12T12:11:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/\"},\"wordCount\":92,\"commentCount\":0,\"keywords\":[\"postgresql\",\"repmgr\"],\"articleSection\":[\"PostgreSQL\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/\",\"url\":\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/\",\"name\":\"Preparaci\u00f3n entorno - Repmgr y Postgresql 13 (parte 2) - Arumel\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/arumel.com\\\/#website\"},\"datePublished\":\"2021-01-12T12:02:02+00:00\",\"dateModified\":\"2021-01-12T12:11:46+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/arumel.com\\\/#\\\/schema\\\/person\\\/e270e777d900dcd47f8eb3895c076b64\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/arumel.com\\\/es\\\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/arumel.com\\\/es\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Preparaci\u00f3n entorno &#8211; Repmgr y Postgresql 13 (parte 2)\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/arumel.com\\\/#website\",\"url\":\"http:\\\/\\\/arumel.com\\\/\",\"name\":\"Arumel\",\"description\":\"Outro sitio WordPress m\u00e1is\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/arumel.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/arumel.com\\\/#\\\/schema\\\/person\\\/e270e777d900dcd47f8eb3895c076b64\",\"name\":\"sm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6207cd8b9baaee6c4cff92251bb20e4b48ce165f93e926218da90832d9f334f9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6207cd8b9baaee6c4cff92251bb20e4b48ce165f93e926218da90832d9f334f9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6207cd8b9baaee6c4cff92251bb20e4b48ce165f93e926218da90832d9f334f9?s=96&d=mm&r=g\",\"caption\":\"sm\"},\"url\":\"https:\\\/\\\/arumel.com\\\/es\\\/author\\\/sergio\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Preparaci\u00f3n entorno - Repmgr y Postgresql 13 (parte 2) - Arumel","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:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/","og_locale":"es_ES","og_type":"article","og_title":"Preparaci\u00f3n entorno - Repmgr y Postgresql 13 (parte 2) - Arumel","og_description":"Ver configuraci\u00f3n parte1 Registramos el primer nodo en el cluster: [postgres@postgres1 ~]$ repmgr primary register INFO: connecting to primary database... NOTICE: attempting to install extension \"repmgr\" NOTICE: \"repmgr\" extension successfully installed NOTICE: primary node record (ID: 1) registered &nbsp; Mostramos el estado del cluster: [postgres@postgres1 ~]$ repmgr cluster show ID | Name | Role | [&hellip;]","og_url":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/","og_site_name":"Arumel","article_published_time":"2021-01-12T12:02:02+00:00","article_modified_time":"2021-01-12T12:11:46+00:00","author":"sm","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"sm","Tiempo de lectura":"4 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/#article","isPartOf":{"@id":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/"},"author":{"name":"sm","@id":"http:\/\/arumel.com\/#\/schema\/person\/e270e777d900dcd47f8eb3895c076b64"},"headline":"Preparaci\u00f3n entorno &#8211; Repmgr y Postgresql 13 (parte 2)","datePublished":"2021-01-12T12:02:02+00:00","dateModified":"2021-01-12T12:11:46+00:00","mainEntityOfPage":{"@id":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/"},"wordCount":92,"commentCount":0,"keywords":["postgresql","repmgr"],"articleSection":["PostgreSQL"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/","url":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/","name":"Preparaci\u00f3n entorno - Repmgr y Postgresql 13 (parte 2) - Arumel","isPartOf":{"@id":"http:\/\/arumel.com\/#website"},"datePublished":"2021-01-12T12:02:02+00:00","dateModified":"2021-01-12T12:11:46+00:00","author":{"@id":"http:\/\/arumel.com\/#\/schema\/person\/e270e777d900dcd47f8eb3895c076b64"},"breadcrumb":{"@id":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/arumel.com\/es\/"},{"@type":"ListItem","position":2,"name":"Preparaci\u00f3n entorno &#8211; Repmgr y Postgresql 13 (parte 2)"}]},{"@type":"WebSite","@id":"http:\/\/arumel.com\/#website","url":"http:\/\/arumel.com\/","name":"Arumel","description":"Outro sitio WordPress m\u00e1is","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/arumel.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Person","@id":"http:\/\/arumel.com\/#\/schema\/person\/e270e777d900dcd47f8eb3895c076b64","name":"sm","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/6207cd8b9baaee6c4cff92251bb20e4b48ce165f93e926218da90832d9f334f9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6207cd8b9baaee6c4cff92251bb20e4b48ce165f93e926218da90832d9f334f9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6207cd8b9baaee6c4cff92251bb20e4b48ce165f93e926218da90832d9f334f9?s=96&d=mm&r=g","caption":"sm"},"url":"https:\/\/arumel.com\/es\/author\/sergio\/"}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9uvW6-2BW","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":10067,"url":"https:\/\/arumel.com\/es\/auto-failover-repmgr-y-postgresql-13-parte-1\/","url_meta":{"origin":10040,"position":0},"title":"Auto failover &#8211; Repmgr y Postgresql 13 (parte 1)","author":"sm","date":"12 de enero de 2021","format":false,"excerpt":"Si repasamos las entradas anteriores Parte1 y Parte2, vemos que tenemos configurado el repmgr pero no hemos activado el demonio para que haga el chequeo continuo. Para ello necesitamos activar el servicio a nivel de SO y cargar su librer\u00eda en postgresql. En el fichero de postgresql.conf a\u00f1adimos la siguiente\u2026","rel":"","context":"En &quot;portada&quot;","block_context":{"text":"portada","link":"https:\/\/arumel.com\/es\/portada-es\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/repmgr-auto-284x300.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":10087,"url":"https:\/\/arumel.com\/es\/auto-failover-repmgr-y-postgresql-13-parte-2\/","url_meta":{"origin":10040,"position":1},"title":"Auto failover &#8211; Repmgr y Postgresql 13 (parte 2)","author":"sm","date":"12 de enero de 2021","format":false,"excerpt":"Ver configuraci\u00f3n de la parte 1. El estado previo del cluster es el siguiente: [postgres@postgres1 ~]$ repmgr cluster show ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string ----+-------------------+---------+-----------+-----------+----------+----------+----------+---------------------------------------------- 1 | postgres1 | primary | * running | | default |\u2026","rel":"","context":"En &quot;portada&quot;","block_context":{"text":"portada","link":"https:\/\/arumel.com\/es\/portada-es\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/repmgr-auto-284x300.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":10063,"url":"https:\/\/arumel.com\/es\/manual-failover-repmgr-y-postgresql-13\/","url_meta":{"origin":10040,"position":2},"title":"Manual failover &#8211; Repmgr y Postgresql 13","author":"sm","date":"12 de enero de 2021","format":false,"excerpt":"Ver configuraci\u00f3n parte 1. Ver configuraci\u00f3n parte 2. Ver switchover manual. Estado previo del cluster: [postgres@postgres1 ~]$ repmgr cluster show ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string ----+-----------+---------+-----------+-----------+----------+----------+----------+---------------------------------------------- 1 | postgres1 | standby | running | postgres2 | default\u2026","rel":"","context":"En &quot;portada&quot;","block_context":{"text":"portada","link":"https:\/\/arumel.com\/es\/portada-es\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/repmgr-manual-300x183.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":10119,"url":"https:\/\/arumel.com\/es\/failover-auto-pgbouncer-repmgr-postgresql-13-parte-4\/","url_meta":{"origin":10040,"position":3},"title":"Failover auto &#8211; Pgbouncer + Repmgr + Postgresql 13 (parte 4)","author":"sm","date":"12 de enero de 2021","format":false,"excerpt":"Ver parte 1 Ver parte 2 Ver parte 3 Vamos a hacer una prueba de balanceo autom\u00e1tico tras la p\u00e9rdida del nodo primario (postgres2) y como balancea el failover a un nodo secundario (postgres1), tras la parada de la conexiones en el pgbouncer, posterior reconfiguraci\u00f3n, y conexi\u00f3n posterior al nuevo\u2026","rel":"","context":"En &quot;portada&quot;","block_context":{"text":"portada","link":"https:\/\/arumel.com\/es\/portada-es\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/pgbouncer-repmgr-auto-285x300.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/pgbouncer-repmgr-auto-285x300.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/pgbouncer-repmgr-auto-285x300.png?resize=525%2C300 1.5x"},"classes":[]},{"id":10057,"url":"https:\/\/arumel.com\/es\/manual-switchover-repmgr-y-postgresql-13\/","url_meta":{"origin":10040,"position":4},"title":"Manual switchover &#8211; Repmgr y Postgresql 13","author":"sm","date":"12 de enero de 2021","format":false,"excerpt":"Ver configuraci\u00f3n parte 1 Ver configuraci\u00f3n parte 2 Comprobaci\u00f3n previa estado cluster: [postgres@postgres1 ~]$ repmgr cluster show ID | Name | Role | Status | Upstream | Location | Priority | Timeline | Connection string ----+-----------+---------+-----------+-----------+----------+----------+----------+---------------------------------------------- 1 | postgres1 | primary | * running | | default | 100 |\u2026","rel":"","context":"En &quot;portada&quot;","block_context":{"text":"portada","link":"https:\/\/arumel.com\/es\/portada-es\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/repmgr-manual-300x183.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9995,"url":"https:\/\/arumel.com\/es\/preparacion-entorno-repmgr-y-postgresql-13-parte-1\/","url_meta":{"origin":10040,"position":5},"title":"Preparaci\u00f3n entorno &#8211; Repmgr y Postgresql 13 (parte 1)","author":"sm","date":"12 de enero de 2021","format":false,"excerpt":"\u00a0 Nos disponemos a preparar un entorno sobre el que realizar pruebas con repmgr 13 (versi\u00f3n 5.2) y postgresql versi\u00f3n 13. En nuestro caso se tratar\u00e1 de un OEL 8.3 (con kernel de redhat). Una vez creada la primera m\u00e1quina virtual procedemos a la instalaci\u00f3n de los repositorios y desactivar\u2026","rel":"","context":"En &quot;PostgreSQL&quot;","block_context":{"text":"PostgreSQL","link":"https:\/\/arumel.com\/es\/postgresql-es\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/repmgr-manual.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/repmgr-manual.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/arumel.com\/wp-content\/uploads\/2021\/01\/repmgr-manual.png?resize=525%2C300 1.5x"},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/posts\/10040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/comments?post=10040"}],"version-history":[{"count":19,"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/posts\/10040\/revisions"}],"predecessor-version":[{"id":10177,"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/posts\/10040\/revisions\/10177"}],"wp:attachment":[{"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/media?parent=10040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/categories?post=10040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arumel.com\/es\/wp-json\/wp\/v2\/tags?post=10040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}