{"id":10745,"date":"2018-03-23T16:31:13","date_gmt":"2018-03-23T15:31:13","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/"},"modified":"2023-07-17T14:55:46","modified_gmt":"2023-07-17T12:55:46","slug":"postgresql-logical-replication-with-pglogical","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/","title":{"rendered":"PostgreSQL &#8211; logical replication with pglogical"},"content":{"rendered":"<p>Although PostgreSQL 10 integrate native logical replication (have a look <a href=\"https:\/\/www.dbi-services.com\/blog\/in-core-logical-replication-will-hit-postgresql-10\/\" target=\"_blank\" rel=\"noopener\">here<\/a> or <a href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-10-beta-1-logical-replication\/\" target=\"_blank\" rel=\"noopener\">here<\/a>), it is always interesting to be aware of alternative solutions to the available in-core features.<br \/>\nOne of those is called <em>pglogical<\/em>. It&#8217;s a Postgres extension developed by <a href=\"https:\/\/www.2ndquadrant.com\/en\/\" target=\"_blank\" rel=\"noopener\">2ndQuadrant<\/a>, major contributor to PostgreSQL development.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-20908\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical.jpg\" alt=\"pg_logical\" width=\"300\" height=\"180\" \/><br \/>\nThe goal of this blog post is to discover how to install pglogical and configure it in order to generate simple logical replication cases.<\/p>\n<h3>Installation<\/h3>\n<p>To get the extension we should start with RPM repository installation :<br \/>\n<code>postgres@ppas02:\/u01\/app\/postgres\/product\/10\/db_1\/ [PG10] <span style=\"color: orange;\">sudo yum install http:\/\/packages.2ndquadrant.com\/pglogical\/yum-repo-rpms\/pglogical-rhel-1.0-3.noarch.rpm<\/span><br \/>\nLoaded plugins: fastestmirror<br \/>\npglogical-rhel-1.0-3.noarch.rpm | 8.3 kB 00:00:00<br \/>\nExamining \/var\/tmp\/yum-root-oH8huK\/pglogical-rhel-1.0-3.noarch.rpm: pglogical-rhel-1.0-3.noarch<br \/>\nMarking \/var\/tmp\/yum-root-oH8huK\/pglogical-rhel-1.0-3.noarch.rpm to be installed<br \/>\n...<br \/>\n...<br \/>\n...<br \/>\nInstalled:<br \/>\npglogical-rhel.noarch 0:1.0-3<\/p>\n<p>Complete!<br \/>\npostgres@ppas02:\/u01\/app\/postgres\/product\/10\/db_1\/ [PG10]<\/code><\/p>\n<p>Once installed, we can add the extension inside our Postgres instance :<br \/>\n<code>postgres=# <span style=\"color: orange;\">CREATE EXTENSION pglogical;<\/span><br \/>\n2017-12-18 16:24:39.079 CET [4327] ERROR: pglogical is not in shared_preload_libraries<br \/>\n2017-12-18 16:24:39.079 CET [4327] STATEMENT: CREATE EXTENSION pglogical;<br \/>\nERROR: pglogical is not in shared_preload_libraries<br \/>\npostgres=#<\/code><\/p>\n<p>Oops&#8230; the pglogical library must be loaded when the cluster starts :<br \/>\n<code>postgres=# <span style=\"color: orange;\">alter system set shared_preload_libraries = 'pglogical';<\/span><br \/>\nALTER SYSTEM<br \/>\npostgres=#<\/code><\/p>\n<p>Restart the cluster to take it in account :<br \/>\n<code>postgres@ppas01:\/u01\/app\/postgres\/product\/10\/db_1\/share\/ [PG10] <span style=\"color: orange;\">pg_ctl -D \/u02\/pgdata\/PG10\/ stop<\/span><br \/>\nwaiting for server to shut down....2017-12-18 16:28:03.895 CET [4447] LOG: received fast shutdown request<br \/>\n2017-12-18 16:28:03.902 CET [4447] LOG: aborting any active transactions<br \/>\n2017-12-18 16:28:03.923 CET [4447] LOG: worker process: logical replication launcher (PID 4455) exited with exit code 1<br \/>\n2017-12-18 16:28:03.923 CET [4449] LOG: shutting down<br \/>\n2017-12-18 16:28:03.940 CET [4447] LOG: database system is shut down<br \/>\ndone<br \/>\nserver stopped<br \/>\npostgres@ppas01:\/u01\/app\/postgres\/product\/10\/db_1\/share\/ [PG10] <span style=\"color: orange;\">pg_ctl -D \/u02\/pgdata\/PG10\/ start<\/span><br \/>\nwaiting for server to start....2017-12-18 16:28:10.405 CET [4654] LOG: listening on IPv4 address \"0.0.0.0\", port 5420<br \/>\n2017-12-18 16:28:10.405 CET [4654] LOG: listening on IPv6 address \"::\", port 5420<br \/>\n2017-12-18 16:28:10.407 CET [4654] LOG: listening on Unix socket \"\/tmp\/.s.PGSQL.5420\"<br \/>\n2017-12-18 16:28:10.416 CET [4655] LOG: database system was shut down at 2017-12-18 16:28:03 CET<br \/>\n2017-12-18 16:28:10.426 CET [4654] LOG: database system is ready to accept connections<br \/>\n2017-12-18 16:28:10.430 CET [4661] LOG: starting pglogical supervisor<br \/>\n2017-12-18 16:28:10.435 CET [4663] LOG: manager worker [4663] at slot 0 generation 1 detaching cleanly<br \/>\n2017-12-18 16:28:10.439 CET [4664] LOG: manager worker [4664] at slot 0 generation 2 detaching cleanly<br \/>\n2017-12-18 16:28:10.444 CET [4665] LOG: manager worker [4665] at slot 0 generation 3 detaching cleanly<br \/>\ndone<br \/>\nserver started<br \/>\npostgres@ppas01:\/u01\/app\/postgres\/product\/10\/db_1\/share\/ [PG10]<\/code><\/p>\n<p>Once the cluster restarted with the library, we may noticed a new OS process :<br \/>\n<code>postgres@ppas01:\/u01\/app\/postgres\/product\/10\/db_1\/share\/ [PG10] ps -ef | grep pglogical<br \/>\npostgres 5001 4994 0 16:33 ? 00:00:00 postgres: bgworker: <span style=\"color: orange;\">pglogical supervisor<\/span><\/code><\/p>\n<p>We should now be able to create the extension :<br \/>\n<code>postgres=# <span style=\"color: orange;\">CREATE EXTENSION pglogical;<\/span><br \/>\nCREATE EXTENSION<br \/>\npostgres=#<br \/>\npostgres=# <span style=\"color: orange;\">\\dx+ pglogical<\/span><br \/>\nObjects in extension \"pglogical\"<br \/>\nObject description<br \/>\n------------------------------------------------------------------------------------------<br \/>\nfunction pglogical.alter_node_add_interface(name,name,text)<br \/>\nfunction pglogical.alter_node_drop_interface(name,name)<br \/>\nfunction pglogical.alter_replication_set(name,boolean,boolean,boolean,boolean)<br \/>\nfunction pglogical.alter_subscription_add_replication_set(name,name)<br \/>\nfunction pglogical.alter_subscription_disable(name,boolean)<br \/>\nfunction pglogical.alter_subscription_enable(name,boolean)<br \/>\nfunction pglogical.alter_subscription_interface(name,name)<br \/>\nfunction pglogical.alter_subscription_remove_replication_set(name,name)<br \/>\nfunction pglogical.alter_subscription_resynchronize_table(name,regclass,boolean)<br \/>\nfunction pglogical.alter_subscription_synchronize(name,boolean)<br \/>\nfunction pglogical.create_node(name,text)<br \/>\nfunction pglogical.create_replication_set(name,boolean,boolean,boolean,boolean)<br \/>\nfunction pglogical.create_subscription(name,text,text[],boolean,boolean,text[],interval)<br \/>\nfunction pglogical.drop_node(name,boolean)<br \/>\nfunction pglogical.drop_replication_set(name,boolean)<br \/>\nfunction pglogical.drop_subscription(name,boolean)<br \/>\nfunction pglogical.pglogical_gen_slot_name(name,name,name)<br \/>\nfunction pglogical.pglogical_max_proto_version()<br \/>\nfunction pglogical.pglogical_min_proto_version()<br \/>\nfunction pglogical.pglogical_node_info()<br \/>\nfunction pglogical.pglogical_version()<br \/>\nfunction pglogical.pglogical_version_num()<br \/>\nfunction pglogical.queue_truncate()<br \/>\nfunction pglogical.replicate_ddl_command(text,text[])<br \/>\nfunction pglogical.replication_set_add_all_sequences(name,text[],boolean)<br \/>\nfunction pglogical.replication_set_add_all_tables(name,text[],boolean)<br \/>\nfunction pglogical.replication_set_add_sequence(name,regclass,boolean)<br \/>\nfunction pglogical.replication_set_add_table(name,regclass,boolean,text[],text)<br \/>\nfunction pglogical.replication_set_remove_sequence(name,regclass)<br \/>\nfunction pglogical.replication_set_remove_table(name,regclass)<br \/>\nfunction pglogical.show_repset_table_info(regclass,text[])<br \/>\nfunction pglogical.show_subscription_status(name)<br \/>\nfunction pglogical.show_subscription_table(name,regclass)<br \/>\nfunction pglogical.synchronize_sequence(regclass)<br \/>\nfunction pglogical.table_data_filtered(anyelement,regclass,text[])<br \/>\nfunction pglogical.wait_slot_confirm_lsn(name,pg_lsn)<br \/>\ntable pglogical.depend<br \/>\ntable pglogical.local_node<br \/>\ntable pglogical.local_sync_status<br \/>\ntable pglogical.node<br \/>\ntable pglogical.node_interface<br \/>\ntable pglogical.queue<br \/>\ntable pglogical.replication_set<br \/>\ntable pglogical.replication_set_seq<br \/>\ntable pglogical.replication_set_table<br \/>\ntable pglogical.sequence_state<br \/>\ntable pglogical.subscription<br \/>\nview pglogical.tables<br \/>\n(48 rows)<\/code><\/p>\n<p>The wal_level parameter must be set to &#8216;logical&#8217; for logical replication :<br \/>\n<code>postgres=# <span style=\"color: orange;\">show wal_level;<\/span><br \/>\nwal_level<br \/>\n-----------<br \/>\nlogical<br \/>\n(1 row)<\/code><\/p>\n<p>And the <a title=\"https:\/\/www.dbi-services.com\/blog\/postgresql-10-beta-1-pg_hba_file_rules-view\/\" href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-10-beta-1-pg_hba_file_rules-view\/\" target=\"_blank\" rel=\"noopener\">pg_hba file<\/a> must contains an entry to allow connections for replication purpose.<br \/>\nImportant : all the steps we have seen until now must be done on the standby side as well.<\/p>\n<h3>What&#8217;s next ?<\/h3>\n<p>Logical replication with Postgres is based on several components :<br \/>\n&#8211; Provider : the primary node\/cluster<br \/>\n&#8211; Subscriber : the standby node\/cluster, on which data will be replicated<br \/>\n&#8211; Replication set : collection of table you want to replicate<br \/>\n&#8211; Subscription : runs the replication, based on the replication set<\/p>\n<p>We&#8217;ll start by creating the provider on the primary side :<br \/>\n<code>postgres=# <span style=\"color: orange;\">select pglogical.create_node (node_name := 'provider1', dsn := 'host=192.168.22.37 port=5420 dbname=postgres');<\/span><br \/>\ncreate_node<br \/>\n-------------<br \/>\n2976894835<br \/>\n(1 row)<br \/>\npostgres=# <span style=\"color: orange;\">select * from pglogical.node_interface;<\/span><br \/>\nif_id | if_name | if_nodeid | if_dsn<br \/>\n------------+-----------+------------+-----------------------------------------------<br \/>\n2402836775 | provider1 | 2976894835 | host=192.168.22.37 port=5420 dbname=postgres<br \/>\n(1 row)<\/code><\/p>\n<p>Notice again a new OS process :<br \/>\n<code>postgres@ppas01:\/home\/postgres\/ [PG10] ps -ef | grep pglogical<br \/>\npostgres 1796 1788 0 15:13 ? 00:00:00 postgres: bgworker: pglogical supervisor<br \/>\npostgres 4566 1788 0 16:05 ? 00:00:00 postgres: bgworker: <span style=\"color: orange;\">pglogical manager 13211<\/span><\/code><\/p>\n<p>On the standby side, we create the subscriber :<br \/>\n<code>postgres=# <span style=\"color: orange;\">select pglogical.create_node(node_name := 'subscriber1', dsn := 'host=192.168.22.38 port=5420 dbname=postgres');<\/span><br \/>\ncreate_node<br \/>\n-------------<br \/>\n330520249<br \/>\n(1 row)<br \/>\npostgres=# <span style=\"color: orange;\">select * from pglogical.node_interface;<\/span><br \/>\nif_id | if_name | if_nodeid | if_dsn<br \/>\n------------+-------------+-----------+----------------------------------------------<br \/>\n2049915666 | subscriber1 |  330520249 | host=192.168.22.38 port=5420 dbname=postgres<br \/>\n2402836775 | provider1   | 2976894835 | host=192.168.22.37 port=5420 dbname=postgres<br \/>\n(1 row)<\/code><\/p>\n<p>What about replication set ? There is 3 existing by default with a different DML replication behavior for each :<br \/>\n<code>postgres=# <span style=\"color: orange;\">select * from pglogical.replication_set;<\/span><br \/>\nset_id   | set_nodeid |      set_name       | replicate_insert | replicate_update | replicate_delete | replicate_truncate<br \/>\n------------+------------+---------------------+------------------+------------------+------------------+--------------------<br \/>\n290045701 | 2976894835 | default             | t                | t                | t                | t<br \/>\n3461245231 | 2976894835 | default_insert_only | t                | f                | f                | t<br \/>\n2465411902 | 2976894835 | ddl_sql             | t                | f                | f                | f<br \/>\n<\/code><\/p>\n<p>We can easily add our own :<br \/>\n<code>postgres=# <span style=\"color: orange;\">select pglogical.create_replication_set('my_set', true, true, true, true);<\/span><br \/>\ncreate_replication_set<br \/>\n------------------------<br \/>\n1521346531<\/code><\/p>\n<p>To start the replication we have to create a subscription (using the replication set we created) from the standby side :<br \/>\n<code>postgres=# <span style=\"color: orange;\">select pglogical.create_subscription(subscription_name := 'subscription1', provider_dsn := 'host=192.168.22.37 port=5420 dbname=postgres', replication_sets := '{my_set}');<\/span><br \/>\ncreate_subscription<br \/>\n---------------------<br \/>\n1763399739<br \/>\n(1 row)<\/p>\n<p>postgres=# <span style=\"color: orange;\">select subscription_name, status FROM pglogical.show_subscription_status();<\/span><br \/>\nsubscription_name |   status<br \/>\n-------------------+-------------<br \/>\nsubscription1     | replicating<br \/>\n<\/code><\/p>\n<p>Have a look in the log file&#8230; replication started with the correct provider and subscription :<br \/>\n<code>2018-02-02 15:16:14.234 CET [5488] LOG:  starting apply for subscription subscription1<br \/>\n2018-02-02 15:17:54.547 CET [5502] LOG:  starting pglogical database manager for database postgres<br \/>\n<\/code><br \/>\n<code>postgres@ppas02:\/u02\/pgdata\/PG10\/ [PG10] ps -ef | grep pglogical<br \/>\npostgres  3113  3105  0 10:01 ?        00:00:00 postgres: bgworker: pglogical supervisor<br \/>\npostgres  4587  3105  0 13:47 ?        00:00:00 postgres: bgworker: pglogical manager 13211<br \/>\n<span style=\"color: orange;\">postgres  5060  3105  0 15:06 ?        00:00:00 postgres: bgworker: pglogical apply 13211:1763399739<\/span><\/code><\/p>\n<p>The last step is to add the tables in the replication set we created :<br \/>\n<code>postgres=# <span style=\"color: orange;\">select pglogical.replication_set_add_all_tables('my_set', ARRAY['public']);<\/span><br \/>\nreplication_set_add_all_tables<br \/>\n--------------------------------<br \/>\nt<br \/>\n(1 row)<\/code><\/p>\n<p>The insert\/update\/delete operations run against the primary server are now replicated to the standby one.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although PostgreSQL 10 integrate native logical replication (have a look here or here), it is always interesting to be aware of alternative solutions to the available in-core features. One of those is called pglogical. It&#8217;s a Postgres extension developed by 2ndQuadrant, major contributor to PostgreSQL development. The goal of this blog post is to discover [&hellip;]<\/p>\n","protected":false},"author":30,"featured_media":10747,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198,83],"tags":[1248,1249,1250,570,77,301],"type_dbi":[],"class_list":["post-10745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","category-database-management","category-postgresql","tag-1248","tag-logical","tag-pglogical","tag-postgres","tag-postgresql","tag-replication"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL - logical replication with pglogical - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL - logical replication with pglogical\" \/>\n<meta property=\"og:description\" content=\"Although PostgreSQL 10 integrate native logical replication (have a look here or here), it is always interesting to be aware of alternative solutions to the available in-core features. One of those is called pglogical. It&#8217;s a Postgres extension developed by 2ndQuadrant, major contributor to PostgreSQL development. The goal of this blog post is to discover [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-23T15:31:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-17T12:55:46+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jo\u00ebl Cattin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jo\u00ebl Cattin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/\"},\"author\":{\"name\":\"Jo\u00ebl Cattin\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/2c774f00321ee734515f0c2f6a96b780\"},\"headline\":\"PostgreSQL &#8211; logical replication with pglogical\",\"datePublished\":\"2018-03-23T15:31:13+00:00\",\"dateModified\":\"2023-07-17T12:55:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/\"},\"wordCount\":350,\"commentCount\":1,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg\",\"keywords\":[\"10\",\"logical\",\"pglogical\",\"postgres\",\"PostgreSQL\",\"Replication\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\",\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/\",\"name\":\"PostgreSQL - logical replication with pglogical - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg\",\"datePublished\":\"2018-03-23T15:31:13+00:00\",\"dateModified\":\"2023-07-17T12:55:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/2c774f00321ee734515f0c2f6a96b780\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg\",\"width\":1200,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL &#8211; logical replication with pglogical\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/2c774f00321ee734515f0c2f6a96b780\",\"name\":\"Jo\u00ebl Cattin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/a4271811924694263d4de5a469f8bd4a90b14d3d90e6ad819b9e2e5ac035a2dc?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a4271811924694263d4de5a469f8bd4a90b14d3d90e6ad819b9e2e5ac035a2dc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a4271811924694263d4de5a469f8bd4a90b14d3d90e6ad819b9e2e5ac035a2dc?s=96&d=mm&r=g\",\"caption\":\"Jo\u00ebl Cattin\"},\"description\":\"Jo\u00ebl Cattin has more than three years of experience in databases management. He is specialized in Oracle solutions such as Data Guard and RMAN and has a good background knowledge of Oracle Database Appliance (ODA), Real Application Cluster (RAC) and applications development on APEX. Jo\u00ebl Cattin\u2019s experience includes other RDBMS, such as PostgreSQL and MySQL. He is Oracle Database 12c Administrator Certified Professional, EDB Postgres Advanced Server 9.5 Certified Professional, RedHat Certified System Administrator and ITILv3 Foundation for Service Management Certified. Jo\u00ebl Cattin holds a degree from the \u00c9cole Sup\u00e9rieure d\u2019Informatique de Gestion (ESIG) in Del\u00e9mont and a Federal Certificate of Proficiency in Computer Science (Certificat f\u00e9d\u00e9ral de Capacit\u00e9 \u2013 CFC).\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/joel-cattin\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL - logical replication with pglogical - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL - logical replication with pglogical","og_description":"Although PostgreSQL 10 integrate native logical replication (have a look here or here), it is always interesting to be aware of alternative solutions to the available in-core features. One of those is called pglogical. It&#8217;s a Postgres extension developed by 2ndQuadrant, major contributor to PostgreSQL development. The goal of this blog post is to discover [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/","og_site_name":"dbi Blog","article_published_time":"2018-03-23T15:31:13+00:00","article_modified_time":"2023-07-17T12:55:46+00:00","og_image":[{"width":1200,"height":720,"url":"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg","type":"image\/jpeg"}],"author":"Jo\u00ebl Cattin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jo\u00ebl Cattin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/"},"author":{"name":"Jo\u00ebl Cattin","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/2c774f00321ee734515f0c2f6a96b780"},"headline":"PostgreSQL &#8211; logical replication with pglogical","datePublished":"2018-03-23T15:31:13+00:00","dateModified":"2023-07-17T12:55:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/"},"wordCount":350,"commentCount":1,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg","keywords":["10","logical","pglogical","postgres","PostgreSQL","Replication"],"articleSection":["Database Administration &amp; Monitoring","Database management","PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/","name":"PostgreSQL - logical replication with pglogical - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg","datePublished":"2018-03-23T15:31:13+00:00","dateModified":"2023-07-17T12:55:46+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/2c774f00321ee734515f0c2f6a96b780"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/pg_logical-e1517578175294.jpg","width":1200,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-logical-replication-with-pglogical\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL &#8211; logical replication with pglogical"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/2c774f00321ee734515f0c2f6a96b780","name":"Jo\u00ebl Cattin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a4271811924694263d4de5a469f8bd4a90b14d3d90e6ad819b9e2e5ac035a2dc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a4271811924694263d4de5a469f8bd4a90b14d3d90e6ad819b9e2e5ac035a2dc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a4271811924694263d4de5a469f8bd4a90b14d3d90e6ad819b9e2e5ac035a2dc?s=96&d=mm&r=g","caption":"Jo\u00ebl Cattin"},"description":"Jo\u00ebl Cattin has more than three years of experience in databases management. He is specialized in Oracle solutions such as Data Guard and RMAN and has a good background knowledge of Oracle Database Appliance (ODA), Real Application Cluster (RAC) and applications development on APEX. Jo\u00ebl Cattin\u2019s experience includes other RDBMS, such as PostgreSQL and MySQL. He is Oracle Database 12c Administrator Certified Professional, EDB Postgres Advanced Server 9.5 Certified Professional, RedHat Certified System Administrator and ITILv3 Foundation for Service Management Certified. Jo\u00ebl Cattin holds a degree from the \u00c9cole Sup\u00e9rieure d\u2019Informatique de Gestion (ESIG) in Del\u00e9mont and a Federal Certificate of Proficiency in Computer Science (Certificat f\u00e9d\u00e9ral de Capacit\u00e9 \u2013 CFC).","url":"https:\/\/www.dbi-services.com\/blog\/author\/joel-cattin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=10745"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10745\/revisions"}],"predecessor-version":[{"id":26743,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/10745\/revisions\/26743"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/10747"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=10745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=10745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=10745"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=10745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}