Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Logical or row-based replication#

Sumit Rawal answered on June 22, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Database replication
  • Data Replication:
  • Statement based replication#
  • Statement based replication#

  • Logical or row-based replication#

    0

    This method of replication is applicable in the context of databases. It allows for decoupling the storage format from the log in contrast to the WAL shipping method of replication. The log in this case is called the logical log to distinguish it from the log created in case of WAL shipping which is a representation of the physical data in the storage engine. Since the logical log is decoupled from the internals of the storage engine, it is easily backwards compatible and allows for the leader and follower to be on different versions of the database software. In fact the two parties can run different storage engines and still be able to work with each other.

    The logical log captures the changes happening in the database at the row level, or in other words it is capturing the delta in the state of database caused by the execution of each statement at the master node. For instance:

    When a new row is inserted in a table, all the column values for that row are logged.

    When a row is updated, all the changed values for a column are logged along with the information that allows for the row to be identified uniquely.

    When a row is deleted, the primary key that uniquely identifies the row is logged. However, in case the table does not define a primary key then all the column values are logged.

    This technique is also called change data capture. A benefit of using this method of replication is that the log can be exported to external systems which can easily parse logical data. These systems could be data warehouses, indexes or caches.

    Popularity 1/10 Helpfulness 1/10 Language sql
    Source: Grepper
    Tags: logical-or sql
    Link to this answer
    Share Copy Link
    Contributed on Jun 22 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.