
{"id":5737,"date":"2024-06-12T10:17:43","date_gmt":"2024-06-12T10:17:43","guid":{"rendered":"https:\/\/test.opensource-db.in\/wp1\/?p=5737"},"modified":"2024-07-30T12:00:23","modified_gmt":"2024-07-30T12:00:23","slug":"postgresql-replication-monitoring-my-learnings","status":"publish","type":"post","link":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/","title":{"rendered":"PostgreSQL Replication Monitoring: My Learnings"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ensuring the health and performance of your PostgreSQL database involves keeping a close eye on replication. This process, where data is copied from one database server to another, is vital for data redundancy and HA. In this blog, we&#8217;ll delve into three effective methods for monitoring PostgreSQL replication: using native Select statements, the `check_postgres` perl script, and understanding WAL internals.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding PostgreSQL Replication Before diving into the monitoring techniques, let&#8217;s briefly touch upon what replication in PostgreSQL entails. Replication involves synchronizing data from a primary server (master) to one or more secondary servers (slaves or replicas). This setup ensures data redundancy, high availability, and load balancing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using Native Select Statements for Replication Monitoring<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PostgreSQL provides several system views and functions that can be queried using Select statements to monitor replication. Here are some essential queries:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Checking Replication Slots<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Replication slots ensure that the primary server retains<code> WAL<\/code> files until they are no longer needed by the standby servers. You can monitor these slots using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# select * from pg_replication_slots ;\n-&#091; RECORD 1 ]-------+----------\nslot_name           | book1\nplugin              | \nslot_type           | physical\ndatoid              | \ndatabase            | \ntemporary           | f\nactive              | t\nactive_pid          | 5688\nxmin                | \ncatalog_xmin        | \nrestart_lsn         | 0\/3018430\nconfirmed_flush_lsn | \nwal_status          | reserved\nsafe_wal_size       | \ntwo_phase           | f<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This query returns information about the replication slots, such as the slot name, database, and the <code>WAL<\/code> positions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Monitoring Replication Lag<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Replication lag indicates the delay between the primary and the standby servers. To monitor this, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nmydb=# SELECT                            \n    client_addr,\n    application_name,\n    state,\n    sync_state,\n    pg_wal_lsn_diff(pg_current_wal_lsn(), replay_lsn) AS replication_lag\nFROM\n    pg_stat_replication;\n   client_addr   | application_name |   state   | sync_state | replication_lag \n-----------------+------------------+-----------+------------+-----------------\n 192.168.232.151 | walreceiver      | streaming | async      |               0\n(1 row)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This query provides details about connected standby servers and the lag in terms of<code> WAL<\/code> log sequence numbers (LSNs).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Checking WAL Receiver Status<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The<code> wal _receiver<\/code> process on the standby server fetches WAL data from the primary server. Monitor its status with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# select * from pg_stat_wal_receiver ;\n-&#091; RECORD 1 ]---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\npid                   | 3997\nstatus                | streaming\nreceive_start_lsn     | 0\/4000000\nreceive_start_tli     | 1\nwritten_lsn           | 0\/48E96C0\nflushed_lsn           | 0\/4000000\nreceived_tli          | 1\nlast_msg_send_time    | 2024-06-12 14:34:42.137068+05:30\nlast_msg_receipt_time | 2024-06-12 14:34:42.13582+05:30\nlatest_end_lsn        | 0\/48E96C0\nlatest_end_time       | 2024-06-12 14:33:11.812817+05:30\nslot_name             | book1\nsender_host           | 192.168.232.150\nsender_port           | 5434\nconninfo              | user=replica password=******** channel_binding=prefer dbname=replication host=192.168.232.150 port=5434 fallback_application_name=walreceiver sslmode=prefer sslcompression=0 sslsni=1 ssl_min_protocol_version=TLSv1.2 gssencmode=prefer krbsrvname=postgres target_session_attrs=any<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This query gives insights into the connection status and the latest received WAL position.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Replication Monitoring with `check_postgres` perl Script<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Monitoring your PostgreSQL replication is crucial for maintaining database performance and reliability. The `check_postgres` perl script is an excellent tool for this task, offering a robust solution for keeping tabs on your replication status. Let\u2019s dive into how you can use this script to ensure your PostgreSQL databases are running smoothly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What is `check_postgres`?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>`check_postgres`<\/code> is a perl script that checks various attributes and metrics of your PostgreSQL database. It integrates seamlessly with monitoring systems like Nagios, Icinga, Zabbix, and others. With its comprehensive set of features, `check_postgres` helps you monitor replication lag, database size, connection statuses, and much more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For setting up `check_postgres` and advanced configurations, be sure to check out the official check_postgres documentation at: <a href=\"https:\/\/bucardo.org\/check_postgres\/\">https:\/\/bucardo.org\/check_postgres\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s a simple command to check replication lag:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>`check_postgres` --action=replication_state --host=&lt;your_host&gt; --dbuser=&lt;your_user&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>&lt;your_host&gt;<\/code> and<code> &lt;your_user&gt;<\/code> with your actual database host and user. This command will return the replication state of your PostgreSQL server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure continuous monitoring, you can set up a cron job that runs the `check_postgres` script at regular intervals. Edit your crontab file with the following command:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*\/5 * * * * \/usr\/local\/bin\/`check_postgres` --action=replication_state --host=&lt;your_host&gt; --dbuser=&lt;your_user&gt; &gt;&gt; \/var\/log\/`check_postgres`.log 2&gt;&amp;1\n <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This setup ensures that any replication issues are promptly detected, allowing you to take swift corrective action.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Exploring WAL Internals<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding the internals of Write-Ahead Logging (WAL) is crucial for effective replication monitoring. WAL is a method used by PostgreSQL to ensure data integrity. Here\u2019s a closer look at its key components:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. WAL Segments<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WAL files are divided into segments, each with a default size of 16MB. These segments store changes made to the database. Monitoring the number of <code>wal_segments<\/code> can give you insights into the database activity and replication.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=# show wal_segment_size ;\n-&#091; RECORD 1 ]----+-----\nwal_segment_size | 16MB<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. WAL Archiving<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure data can be recovered in the event of a failure, WAL segments can be archived. Configure your PostgreSQL server to archive WAL segments by setting the archive_mode and archive_command parameters in the postgresql.conf file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>```archive_mode = on\narchive_command = 'cp %p \/path\/to\/archive\/%f'\n```<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. WAL Buffers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WAL buffers are memory areas used to store WAL data before it\u2019s written to disk. Monitoring the buffer usage can help you tune the performance. Use the following query to check the WAL buffer status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mydb=#   \nSELECT * FROM pg_stat_bgwriter;\n-&#091; RECORD 1 ]---------+---------------------------------\ncheckpoints_timed     | 37\ncheckpoints_req       | 0\ncheckpoint_write_time | 213379\ncheckpoint_sync_time  | 3\nbuffers_checkpoint    | 2117\nbuffers_clean         | 0\nmaxwritten_clean      | 0\nbuffers_backend       | 5794\nbuffers_backend_fsync | 0\nbuffers_alloc         | 3693\nstats_reset           | 2024-06-12 10:33:48.003491+05:30<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This query returns statistics about the background writer process, including the WAL buffer usage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Monitoring PostgreSQL replication is essential for maintaining a robust and efficient database environment. By utilizing native Select statements, the check_postgres perl script, and understanding WAL internals, you can gain deep insights into your replication status and performance. Regular monitoring and timely alerts can help you prevent issues before they impact your applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure your PostgreSQL replication setup remains healthy, consider implementing the methods discussed in this guide. Regularly review your replication status, adjust configurations as needed, and stay informed about the latest PostgreSQL features and best practices.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Ensuring the health and performance of your PostgreSQL database involves keeping a close eye on replication. This process, where [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":5739,"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":[23,42,89],"tags":[],"class_list":["post-5737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql-14","category-postgresql-15","category-postgresql-16"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL Replication Monitoring: My Learnings - 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=\"PostgreSQL Replication Monitoring: My Learnings - OpenSource DB\" \/>\n<meta property=\"og:description\" content=\"Introduction: Ensuring the health and performance of your PostgreSQL database involves keeping a close eye on replication. This process, where [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/\" \/>\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-12T10:17:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-30T12:00:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.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=\"5 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-replication-monitoring-my-learnings\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/\"},\"author\":{\"name\":\"Shameer Bhupathi\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5\"},\"headline\":\"PostgreSQL Replication Monitoring: My Learnings\",\"datePublished\":\"2024-06-12T10:17:43+00:00\",\"dateModified\":\"2024-07-30T12:00:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/\"},\"wordCount\":727,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#organization\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png\",\"articleSection\":[\"PostgreSQL 14\",\"PostgreSQL 15\",\"PostgreSQL 16\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/\",\"name\":\"PostgreSQL Replication Monitoring: My Learnings - OpenSource DB\",\"isPartOf\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png\",\"datePublished\":\"2024-06-12T10:17:43+00:00\",\"dateModified\":\"2024-07-30T12:00:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage\",\"url\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png\",\"contentUrl\":\"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png\",\"width\":1800,\"height\":945},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.opensource-db.in\/wp1\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL Replication Monitoring: My Learnings\"}]},{\"@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":"PostgreSQL Replication Monitoring: My Learnings - 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":"PostgreSQL Replication Monitoring: My Learnings - OpenSource DB","og_description":"Introduction: Ensuring the health and performance of your PostgreSQL database involves keeping a close eye on replication. This process, where [&hellip;]","og_url":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/","og_site_name":"OpenSource DB","article_publisher":"https:\/\/www.facebook.com\/people\/OpenSource-DB\/100072970755470\/","article_published_time":"2024-06-12T10:17:43+00:00","article_modified_time":"2024-07-30T12:00:23+00:00","og_image":[{"width":1800,"height":945,"url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#article","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/"},"author":{"name":"Shameer Bhupathi","@id":"https:\/\/test.opensource-db.in\/wp1\/#\/schema\/person\/422480fbefed0b2cee82aeab232110f5"},"headline":"PostgreSQL Replication Monitoring: My Learnings","datePublished":"2024-06-12T10:17:43+00:00","dateModified":"2024-07-30T12:00:23+00:00","mainEntityOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/"},"wordCount":727,"commentCount":0,"publisher":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#organization"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png","articleSection":["PostgreSQL 14","PostgreSQL 15","PostgreSQL 16"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/","url":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/","name":"PostgreSQL Replication Monitoring: My Learnings - OpenSource DB","isPartOf":{"@id":"https:\/\/test.opensource-db.in\/wp1\/#website"},"primaryImageOfPage":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage"},"image":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage"},"thumbnailUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png","datePublished":"2024-06-12T10:17:43+00:00","dateModified":"2024-07-30T12:00:23+00:00","breadcrumb":{"@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#primaryimage","url":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png","contentUrl":"https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png","width":1800,"height":945},{"@type":"BreadcrumbList","@id":"https:\/\/test.opensource-db.in\/wp1\/postgresql-replication-monitoring-my-learnings\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.opensource-db.in\/wp1\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL Replication Monitoring: My Learnings"}]},{"@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.png",1800,945,false],"landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png",1800,945,false],"portraits":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png",1800,945,false],"thumbnail":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-150x150.png",150,150,true],"medium":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-300x158.png",300,158,true],"large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1024x538.png",1024,538,true],"1536x1536":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image-1536x806.png",1536,806,true],"2048x2048":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png",1800,945,false],"ultp_layout_landscape_large":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png",1200,630,false],"ultp_layout_landscape":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png",870,457,false],"ultp_layout_portrait":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.png",600,315,false],"ultp_layout_square":["https:\/\/test.opensource-db.in\/wp1\/wp-content\/uploads\/2024\/06\/image.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\/postgres\/postgresql-14\/\" rel=\"category tag\">PostgreSQL 14<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-15\/\" rel=\"category tag\">PostgreSQL 15<\/a> <a href=\"https:\/\/test.opensource-db.in\/wp1\/category\/postgres\/postgresql-16\/\" rel=\"category tag\">PostgreSQL 16<\/a>","rttpg_excerpt":"Introduction: Ensuring the health and performance of your PostgreSQL database involves keeping a close eye on replication. This process, where [&hellip;]","_links":{"self":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5737","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=5737"}],"version-history":[{"count":3,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5737\/revisions"}],"predecessor-version":[{"id":5741,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/posts\/5737\/revisions\/5741"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media\/5739"}],"wp:attachment":[{"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/media?parent=5737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/categories?post=5737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.opensource-db.in\/wp1\/wp-json\/wp\/v2\/tags?post=5737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}