Credit: saint Sep 14, 2023 · PostgreSQL 16 raises its performance, with notable improvements to query parallelism, bulk data loading, and logical replication. 0) works. Jun 27, 2024 · PGD overview v 5. Allow logical decoding to more efficiently process cache invalidation messages (Dilip Kumar) This allows logical decoding to work efficiently in presence of a large amount of DDL. The max_worker_processes parameter determines the maximum number of worker processes that PostgreSQL can start. 4. To initiate streaming replication, the frontend sends the replication parameter in the startup message. Nov 7, 2022 · To mimic a production scenario, we created an active-active environment with AWS DMS as a logical replication tool to another Aurora PostgreSQL database instance. to PostgreSQL replication. You will also work with the PostgreSQL optimizer, configure Postgres for high speed by looking… Jan 24, 2023 · It then describes these components of logical replication: 1. Apr 12, 2024 · is more relevant for PostgreSQL. Logical replication is one of these techniques. 4, and generally obey the same message flow as physical replication. PostgreSQL replication is available in two distinct flavors: logical and physical. logical_decoding=on on a Cloud SQL instance, or wal_level=logical on an external instance. Now let’s do the above exercise for two overlapping transactions. But logical decoding mainly depends on the information on the transactions being executed since it is needed to create the data snapshot to Feb 17, 2023 · With Aurora PostgreSQL versions 11. 12, 13. Optimize WAL configuration. 3Logical slot exported snapshots are not persistent or crash safe. It is aimed to replicate data between tables in two separate Postgres databases using a replication identity, usually a primary key. Note: shared_preload_libraries may have multiple comma-separated values. minimal removes all logging except the information required to recover from a crash or immediate shutdown. 2. sudo chown postgres -R /var/lib/postgresql/14/main/. Sep 30, 2021 · Distributed PostgreSQL databases stand to benefit from PostgreSQL 14. See PostgreSQL CREATE PUBLICATION / SUBSCRIPTION. When you use the write-through cache, the logical decoder looks in the cache first for data to satisfy queries; if the data is […] Logical Replication. 5 using an RDS snapshot to initialize the target database. A dump/restore using pg_dumpall or use of pg_upgrade or logical replication is required for those wishing to migrate data from any previous release. In physical replication, each change in the master is streamed through the WAL (write-ahead logging) and applied in the standby/destination server. May 13, 2021 · From the perspective of WAL records, this level is virtually the same as replica: records are added that relate to replication origins, as well as arbitrary logical records that applications can add to WAL. Use SELECT * FROM pg_stat_wal_receiver; on the replica. To set up native logical replication, logical decoding must be enabled on the primary instance, by setting cloudsql. Logical replication. E. Edit your postgresql. Jul 30, 2019 · Logical replication uses logical slots that remain ignorant of the recipient. To enable logical replication, set the parameter rds. 8). Nov 15, 2023 · Cascading replication, combining physical and logical replication. In the case of a walsender, they are encapsulated inside replication protocol WAL messages as described in Section 55. The replicated data can be reduced by using a row filter. Finally, logical adds information necessary to support logical decoding. Tuning logical replication in Aurora and Amazon RDS is important for achieving optimal performance, scalability, and availability. Logical Replication replicates changes of objects based on their replication identity, which is usually a primary key. logical_replication to 1. Continuous Archiving in Standby. This can be done by configuring the following settings in your postgresql. The node where a publication is defined is referred to as publisher. Row_format: Replicates the change or the complete statement. We use the term logical in contrast to physical replication, which uses exact block addresses and byte-by-byte replication Using logical replication allows users to replicate data between different database versions, making it an ideal tool for migrating databases with minimal downtime. 5, a new feature is provided that improves performance for workloads that rely on Aurora PostgreSQL logical replication. Presently, accesses to tables and indexes in both disk-block and individual-row terms are counted. Logical replication is a flexible solution allowing: Standard replication from a primary instance to a replica; Selective replication of only certain tables or rows; Replication across PostgreSQL major versions Feb 24, 2024 · The logical replication in PostgreSQL follows the steps given below: Step 1: A snapshot of the publishing database is copied to the subscriber. It follows a publisher and subscriber model where there can be one or more publishers or subscribers. Sep 14, 2023 · PostgreSQL 16 raises its performance, with notable improvements to query parallelism, bulk data loading, and logical replication. Configuration Settings #. A logical replication subscription can be a standby for synchronous replication (see Section 27. Row filters and column lists can reduce the amount of data sent by the publisher and processed by the subscriber, thus reducing network consumption and CPU overhead. In this blog post, I want to encourage PostgreSQL users who abandoned logical replication in the past due to its shortcomings to reconsider it again as PostgreSQL 13 and 14 along with Patroni solves most of the difficulties. There are many features in this release for developers and administrators alike, including more SQL/JSON syntax, new monitoring stats for your workloads, and greater flexibility in defining access control rules for Quick Setup. In this blog, I will dive deep into a couple of performance features for logical replication, demonstrate the steps for seeing the features in action, and share the results of Sep 14, 2023 · Postgres 16 highlights include updates around privilege administration, logical replication, performance improvements, and comprehensive monitoring features. It also enables distributed Postgres clusters with high availability up to five 9s. Each level Jul 2, 2020 · PostgreSQL Logical Replication: Advantages, EDB's Contributions and PG 16 Enhancements PostgreSQL, known for its powerful features and robustness, offers various replication methods to ensure high availability, data consistency, and near-zero-downtime upgrades. These services use pglogical, which is an open-source PostgreSQL extension, to implement logical replication. An example. These tips can help you enhance performance, reduce replication lag, and ensure the high availability and reliability of your database system. When logical replication is disabled, invalidation messages are generated only at transaction completion. Logical Replication. For a detailed analysis on all the above topics on Postgres Logical Replication, checkout this blog. Database servers can work together to allow a second server to take over quickly if the primary server fails (high availability), or to allow several computers to serve the same data (load balancing). Allow publication of all tables in a schema. Here is a breakdown. These messages are either returned by the replication slot SQL interface or are sent by a walsender. When you encounter replication lag, follow these steps: Check the Replication Status : Use SELECT * FROM pg_stat_replication; on the primary. One of the differences between streaming replication 1 and logical replication 2 in PostgreSQL is that streaming replication replicates the Jun 7, 2023 · By default, this is the primary key, if there is one. Cloud SQL enables you to configure your own replication solutions by using PostgreSQL's logical replication features. Apr 18, 2018 · Logical replication in PostgreSQL uses a publish and subscribe model with one or more subscribers subscribing to one or more publications on a publisher node. Slots and HA failover - When using high-availability (HA) enabled servers with Azure Database for PostgreSQL flexible server, be aware that logical replication slots aren't preserved during failover events. This establishes the replication pipeline from source to target. A Boolean value of true (or on, yes, 1) tells the backend to go into physical replication walsender mode, wherein a small set of replication commands, shown below, can be issued instead of SQL statements. PostgreSQL 14 also adds several other performance enhancements to the logical decoding The default value is replica, which writes enough data to support WAL archiving and replication, including running read-only queries on a standby server. The standby name is by default the subscription name. 9 and a v12. By adding the ability to filter data based on origin, we can set up n-way logical replication, and that will prevent loops when performing bi-directional replication. If a published table sets a row filter, a row is replicated only if its data satisfies the row filter Let's see how they affect performance. EDB Postgres Distributed (PGD) provides multi-master replication and data distribution with advanced conflict management, data-loss protection, and throughput up to 5X faster than native logical replication. These logical slots also enable the RDS for PostgreSQL to be used as a source for AWS Database Migration Service Aug 23, 2018 · And the PostgreSQL Documentation has this definition for Logical Replication: “Logical replication is a method of replicating data objects and their changes, based upon their replication identity (usually a primary key). . This blog post on migrating a terabyte-scale PostgreSQL database to Timescale demonstrates how easy it is to migrate without downtime. Quick Setup. Monitoring #. This can be used to distribute read queries among replica nodes, improving performance and availability. Since PostgreSQL 10, PostgreSQL supports native built-in logical replication. If the owner of the subscription does not have the By default, all data from all published tables will be replicated to the appropriate subscribers. A somewhat simplified figure of the with two just two nodes looks like this: May 8, 2023 · Step 2: Create a logical replication slot on the primary serverNext, we need to create a logical replication slot on the primary server to capture the changes made to the table1. Synchronous Replication. logical replication. The replica will now be running in hot standby mode. Enhanced IO Monitoring with pg_stat_io . Publication #. We explore the MERGE statement, new WAL compression algorithms, enhancements to logical replication and PUBLIC schema permissions, improvements to partition tables, and some general performance improvements. In PostgreSQL, it gives users fine-grained control over the replicated data and information security. Because logical replication is based on a similar architecture as physical streaming replication, the monitoring on a publication node is similar to monitoring of a physical replication primary (see Section 27. Logical replication requires several configuration options to be set. The above items and other new features of PostgreSQL 16 are explained in more detail in the sections below. 5. Disadvantages of Postgres Logical Replication for CDC. PostgreSQL supports both mechanisms concurrently, see Chapter 26. Jan 20, 2016 · In this blog post I’d like to discuss the performance limits of logical replication solutions in general, and also how they apply to pglogical. Jun 9, 2020 · BDR is a multi-master replication solution, and it has different versions. I am really excited about the new feature that allows logical replication from standbys, allowing users to: create logical decoding from a read-only standby. So far so good. Oct 26, 2023 · Logical replication uses a publish and subscribe model with one or more subscribers subscribing to one or more publications on a publisher node. A method of logically replicating data changes from one node ("publisher") to another node ("subscriber"). Web servers serving static web pages can be combined quite easily by May 25, 2023 · PostgreSQL 16 also includes several performance improvements to logical replication. Jan 10, 2024 · To set up logical replication, you must first create a publisher on the source database that defines which tables to publish. conf configuration file: Set wal_level = logical. Aug 2, 2023 · I briefly discussed replication methods in PostgreSQL, and provided a summary of some of the key features of logical replication that made it in PostgreSQL 16. 17, 12. You’d typically use the primary key or an index as the “replica identity” and avoid setting the “replica identity” to full. PostgreSQL supports logical replication, which allows for selective replication of specific tables or May 4, 2023 · May 04, 2023. 1. Jul 20, 2023 · Replication is a key feature in PostgreSQL that allows you to replicate data across multiple database instances. Continuous archiving can be used to create a high availability (HA) cluster configuration with one or more standby servers ready to take over operations if the primary server fails. 2 days ago · Logical replication. Aurora global database It physically replicates your data with no impact on database performance, enables fast local reads with low latency in each Region, and provides Nov 1, 2021 · Postgres ships with a few built-in logical replication plugins. Ideally, database servers could work together seamlessly. Jun 2, 2023 · Terms. Additional replication slots may be required for the initial data synchronization of pre-existing table data and those will be dropped at the end of data synchronization. A somewhat simplified figure of the with two just two nodes looks like this: Logical Replication •Logical replication is the method of copying data objects and changes based on replication identity. I am confused about some paramters and how they are used. For a replication slot, we have two parameters wal_sender_timeout and wal_keep_segments. •Provides fine grained control over data replication and security. Apr 27, 2023 · Feature summary. Jan 29, 2024 · A: PostgreSQL is expected to focus on enhancing sharding, logical replication, and performance enhancements, among other features. 0. reduce the workload on the primary server. Then the walreceiver will synchronize data and send a feedback message to the walsender according to this message. PostgreSQL supports both mechanisms concurrently, see Chapter 27. Shell. You can tune the parameters in the pglogical extension to manage the performance of logical replication 31. Migration to Version 16 #. Now, start the PostgreSQL server. Jan 17, 2022 · July 2023: This post was reviewed for accuracy. Create the following extensions. In one RDS cluster, you can create multiple databases. Most options are relevant only on one side of the replication. MySQL is expected to focus on further improving high availability, security, and performance and may continue to evolve its support for analytics, machine learning, and high-performance data processing. Oct 10, 2022 · Here is the output from running the replication command. This includes allowing the subscriber to apply large transactions in parallel, use indexes other than the PRIMARY KEY to perform lookups during UPDATE or DELETE operations, and allow for tables to be copied using binary format during initialization. This will contain the theoritical and practical aspects of to implement High Performance Postgres. 9. 4Logical slot exported snapshots cannot be used to offload consistent reads to replicas. Postgres has introduced physical (binary) replication starting in PostgreSQL 9. BDR provides asynchronous multi-master logical replication. PostgreSQL 16 introduces pg_stat_io, a new comprehensive view that offers deeper insights into IO activity within the database. PostgreSQL 's cumulative statistics system supports collection and reporting of information about server activity. Let’s dive in. 4 and PG 11 using pglogical extension. Architecture. Stream Jan 20, 2016 · In this blog post I’d like to discuss the performance limits of logical replication solutions in general, and also how they apply to pglogical. One should note that Logical Replication is not available in very old versions of PostgreSQL, specifically those predating version 9. 25. Streaming Replication Protocol #. 2 ). A user might choose to use row filters for behavioral, security or performance reasons. The node where a publication is defined is referred to as the publisher. In many cases, the data’s replication identity is a primary key. Postgres. If replication pauses or WALs go unconsumed, source instance storage can fill up quickly. The first 30 seconds emulate the behaviour of PostgreSQL 14, where there was no I/O concurrency and the replica could not keep up with the primary server, so the replication lag increased. 24. Each publication exists in only one database. Early versions of BDR are open-source but its latest version is closed-source. pg_stat_slru. The standby connects to the primary, which streams WAL records to the standby as they're generated, without waiting for the WAL file to be filled. 01 on test2 Trx2: Ends at 10. 2. A publication is a set of changes generated from a table or a group of tables, and might also be described as a change set or replication set. Oct 30, 2023 · In this post, we take a close look at some of the most impactful features of PostgreSQL 15. To avoid this situation, make sure that you verify the following settings: Set parameter rds. RDS for PostgreSQL supports logical replication from standbys with PostgreSQL 16. to homogeneous or heterogeneous targets. There are many features in this release for developers and administrators alike, including more SQL/JSON syntax, new monitoring stats for your workloads, and greater flexibility in defining access control rules for Apr 27, 2024 · Logical replication limitations apply as documented here. This step is also called the table synchronization phase. 02 Trx1: Ends at 10. The node where a subscription is defined is referred to as the subscriber. In this Apr 1, 2024 · Postgres logical replication is a powerful feature central to the distributed/HA Postgres ecosystem. Kickstarting Your PostgreSQL Performance Tuning: max_worker_processes. 10. I have reading about difference between logical replication slots and phyiscal replication slots in Postgres. conf: wal_level = logical shared_preload_libraries = 'pglogical'. Dec 16, 2021 · Replication Slot Disk Usage (MB) — Publisher. A publication can be defined on any physical replication primary. Jun 10, 2024 · Native logical replication is a built-in feature which was introduced in PostgreSQL 10. Cross-engine Events are append to the binlog (unless skipped sql_log_bin) Slaves filter using do%. This solution is developed by 2ndQuadrant and one of the most elegant Multimaster solutions to date. Engine log + Binlog -> byte encoded -> binlog stream -> binlog apply. 28. Note that Feb 17, 2023 · Amazon Aurora PostgreSQL-Compatible Edition recently added the logical replication write-through cache. 8, and 14. Per the title of this post, the next is the list of steps to set up a PostgreSQL logical replication between a PostgreSQL v11. pg_hba. Here we introduce three key new features. This allows a set of tables to be partially replicated. Jun 1, 2023 · 8 min read. When using logical replication, PostgreSQL can now stream in-progress transactions to subscribers, with significant performance benefits for applying large transactions on subscribers. Afterward, execute the following command on the replica to grant ownership of the data directory to the postgres user. 1. Lengthy, bulk transactions are known to cause severe problems to logical replication. The term logical is used to distinguish it from physical Dec 9, 2020 · 1. Watch on. Postgres 16 is hot off the press with the beta release last week. 2 days ago · Set up native PostgreSQL logical replication. conf. Subscribers pull data from the Jan 25, 2024 · Column lists in logical replication publications - an overview of this useful PostgreSQL feature; Performance impact of row filters and column lists in logical replication; The 1-2-3 for PostgreSQL Logical Replication Using an RDS Snapshot; Failover of Logical Replication Slots in PostgreSQL; Replica identity for logical replication Feb 1, 2024 · To ensure your PostgreSQL streaming replication runs smoothly and efficiently, incorporating specific optimization strategies is essential. Sep 30, 2021 · This allows logical streaming of in-progress transactions. Aug 18, 2022 · Therefore, in PostgreSQL 15, after the walsender skips an empty transaction in the synchronous logical replication, it will send a keep-alive message to the walreceiver and ask for a feedback message. Logical replication copies the data objects in the database and the changes that happen to them. However, max_replication_slots is used on both the publisher and the subscriber, but it has a different meaning for each. 5Logical slots can fill pg_wal and can't benefit from archiving. In PostgreSQL 10 and later, logical replication connections are treated by pg_hba. To enable logical replication of a self-managed PostgreSQL source database, set the following parameters and values in the postgresql. We’ll also touch upon the new pg_log_standby_snapshot function. TL;DR - faster decoding speed and lesser peak slot size duration. Apr 13, 2023 · Replication lag is the delay between the time when data is written to the primary database and the time when it is replicated to the standby databases. 3. Next, create a subscription on the target database that subscribes to one or more of the publications from the publisher database. conf as regular connections to the provider database. In this blog, we cover the importance and drawbacks of logical replication, EDB's contributions to this technology, and the intriguing improvements made in PostgreSQL 16. PostgreSQL supports block-based (physical) replication as well as the row-based (logical) replication. Trx1: Starts at 10. Tuning these parameters can help you Feb 11, 2024 · In the world of database management, ensuring data consistency, availability, and scalability is paramount. Uses for physical read replicas can include high availability, disaster May 18, 2023 · Now in Fujitsu Enterprise Postgres 15, a few important enhancements are introduced in logical replication. g. Subset of SQL, used for defining and managing the structure of a database. Streaming replication allows a standby server to stay more up-to-date than is possible with file-based log shipping. In the context of PostgreSQL, logical Jan 9, 2024 · Troubleshooting Steps. Logical decoding messages can be read using change data capture tools like Debezium. PGD overview. Both of these have pros and cons, as well as best practices. For first one postgres disconnects a replication slot if replication connection is Jul 12, 2023 · PostgreSQL 16 includes numerous improvements in logical replication designed to enhance performance, bolster data consistency, and advance compatibility. Up until PostgreSQL 9. 30 Let's wait for Trx2 to appear on the target side and then reboot the test2 database (Subscriber) while Trx1 replication is still going on after commit. To reduce the amount of time spent in this phase, you can spawn multiple table synchronization workers. If a published table sets a row filter, a row is replicated only if its data satisfies the row filter expression. Caveats. CREATE / ALTER / DROP a database object (TABLE Mar 9, 2023 · Once installed, you'll need to configure PostgreSQL to load the extension and use logical replication. Mar 23, 2018 · However, PostgreSQL 10 came up with a feature called Logical Replication, through which we can perform database/object level replication. This guide is for database developers, database engineers, and administrators who want to tune memory, autovacuum, logging, and logical replication parameters for their PostgreSQL databases. This addition is a leap forward for database monitoring and performance tuning. Subscribers. Set max_replication_slots to a value greater than 1. 31. In E66 of “5mins of Postgres” we're talking about logical decoding on a standby in Postgres 16, which allows us to keep following the logical replication stream whilst a failover happens. Physical replication is traditionally used to create read-only replicas of a primary instance, and utilized in both self-managed and managed deployments of PostgreSQL. Jan 11, 2024 · To set up logical replication following the primary-standby pattern, start by configuring your primary database. Execute the following command in the psql console on the primary server: Oracle PL/SQL. WAL -> Logical Decoding/output_plugin -> logical log -> sender -> receiver & apply. And logical decoding is more like a subset of logical replication. •Publisher / Subscriber model - one or more subscriber nodes subscribe to one or more publisher nodes. Waiting for Postgres 16: Logical decoding on standbys. conf has to allow logical replication connections from localhost. Begin #. Apr 4, 2019 · The following sequence of steps demonstrates a high-level procedure to setup replication between PG 9. 27. This capability is widely referred to as warm standby or log shipping. Logical replication in PostgreSQL is done on a per-database basis, which means there will be at minimum one publication and subscription per database. Consuming events through Logical Replication essentially involves direct access to the file system, preserving the performance of the PostgreSQL database. Logical decoding on a read replica. To maintain logical replication slots and ensure data consistency after a Following, you can find information specific to working with read replicas with RDS for PostgreSQL. 2Syncing logical replication slot state to physical replicas. Logical replication allows fine-grained control over both data replication and security. DDL--Data Definition Language. MySQL. By using version 2 of the logical replication protocol to stream in-flight transactions, we can efficiently manage WAL spikes during sizable transactions, enhancing logical decoding performance and mitigating disk full issues caused by 27. Nikolay: In your AWS DMS supports change data capture (CDC) using logical replication. Logical replication is a method of replicating data objects and their changes, based upon their replication identity (usually a primary key). Mar 6, 2023 · Postgres allows to emit messages into its write-ahead log (WAL), without updating any actual tables. The total number of rows in each table, and information about vacuum and 55. It is different to physical replication, in which replication is based on blocks and byte Jun 1, 2023 · Roberto Mello. The apply piece is, you know, PostgreSQL and that's the standard. e. PostgreSQL 15 makes sure that as part of logical replication on the subscriber, each INSERT, UPDATE, DELETE, TRUNCATE, or COPY command on the apply worker or the tablesync worker checks that the owner of the subscription has permissions to complete the required operation. This allows you to create logical decoding from a read-only standby that reduces the load on the primary DB instance. physical replication. Among the myriad strategies to achieve these goals, logical replication in PostgreSQL stands out as a powerful feature that allows data to be replicated to different systems in real-time. This encompasses not only query parallelism but other auxiliary processes as well, like logical replication and background tasks. Publishers. Verify the PostgreSQL parameters for logical replication. The reason is this quote from the Postgres docs (emphasis mine): If the table does not have any suitable key, then it can be set to replica identity “full Sep 22, 2016 · A new rds_replication role, assigned to the master user by default, can be used to grant permissions to manipulate and stream data through logical slots. PostgreSQL Database Replication Types. conf file to enable logical replication by setting the wal_level to logical, and adjust max_replication_slots and max_wal_senders to accommodate the number of replicas you need. Create the replication user and grant all the required privileges. The logical replication write-through cache helps improve performance by reducing the amount of Aurora storage I/O that takes place during logical decoding. Oct 4, 2021 · As of Postgres 12, there is no way to do transparent DDL replication to other PostgreSQL clusters alongside any logical replication technology built on standard PostgreSQL. 00 on test1 (long running) Trx2: Starts at 10. This not only enhances read performance across Feb 25, 2022 · Conclusion. Nov 10, 2022 · Figure 1: This chart depicts I/O concurrency (shown in blue) impacting replication lag (shown in purple, also called replay lag). Jun 14, 2021 · 2. Evaluate Network Performance : Use tools like ping or netstat to check for network issues. logical_replication: If this parameter enables the use of the RDS PostgreSQL instance Apr 8, 2022 · Logical replication works by copying/replicating data objects and their changes based on their replication identity. We use the term logical in contrast to physical replication, which uses exact block addresses and byte-by-byte replication. We monitor database performance with the help of Amazon RDS Performance Insights, and we can control database load with Apache JMeter and monitor performance. 8. The monitoring information about subscription is visible in pg_stat_subscription. Replication lag can have serious consequences in high Jul 26, 2021 · The 1-2-3 Steps. This performance improvement is implemented via a write-through cache specifically designed to improve the latency of logically replicated data to clients. Up to Fujitsu Enterprise Postgres 14, to create a publication for a schema with n tables, you need to specify those n tables manually during CREATE Sep 1, 2023 · PostgreSQL, known for its powerful features and robustness, offers various replication methods to ensure high availability, data consistency, and near-zero-downtime upgrades. Firstly, let’s see how physical replication (built into PostgreSQL since version 9. where external clients like pg_BADGER can read the slot and replicate. You'll examine all the advanced aspects of PostgreSQL 12 in detail, including logical replication, database clusters, performance tuning, and monitoring. 6, logical replication connections are managed using the replication keyword in pg_hba. Basic syntax. Oct 12, 2022 · Streaming replication is a core utility of PostgreSQL introduced in version 9. The guide also covers parameters that are specific to Amazon RDS for PostgreSQL and Aurora PostgreSQL-Compatible. Postgres also 31. Statistics Functions. Sep 14, 2023 · Prior to Postgres 16, setting a bi-directional or logical replication among nodes was difficult, because if we set up replication for a table, it would lead to an infinite loop. Step 1 : Consider pgserver_94 to be the source server with a database : percona_94 running on PostgreSQL 9. •Copy data in a format that can be interpreted by Logical replication is a method of replicating data changes from publisher to subscriber. The most well-known is the pgoutput plugin, which can stream changes to a remote client with a well-defined protocol . In PostgreSQL, replication lag can occur due to various reasons such as network latency, slow disk I/O, long-running transactions, etc. 🔄 Versions 3 and 4 brought in support for two-phase commits and parallel apply of in-flight transactions, further enhancing the flexibility and efficiency of logical replication. mc pc hn ws ik ia oq jo bl jm