Write-ahead logging

Write-ahead logging Algorithms for Recovery and Isolation Exploiting Semantics - Detailed Pedia

...Create log records of the form (Sequence Number, Transaction ID, Page ID, Redo, Undo, Previous Sequence Number)...

PostgreSQL includes built-in binary replication based on shipping the changes (write-ahead logs (WAL)) to replica nodes asynchronously, with the ability to run read-only queries against these replicated nodes. This allows splitting read traffic among multiple nodes efficiently...

MySQL 中的WAL机制 | mysql

Write-Ahead Logging | Database File Format (sqlite.org)

4. The Write-Ahead Log

Beginning with version 3.7.0 (2010-07-21), SQLite supports a new transaction control mechanism called "write-ahead log" or "WAL". When a database is in WAL mode, all connections to that database must use the WAL. A particular database will use either a rollback journal or a WAL, but not both at the same time. The WAL is always located in the same directory as the database file and has the same name as the database file but with the string "-wal" appended.

4.1. WAL File Format

A WAL file consists of a header followed by zero or more "frames". Each frame records the revised content of a single page from the database file. All changes to the database are recorded by writing frames into the WAL. Transactions commit when a frame is written that contains a commit marker. A single WAL can and usually does record multiple transactions. Periodically, the content of the WAL is transferred back into the database file in an operation called a "checkpoint".

分库分表中间件有很多。不知有没有这样做的:同时使用PostgresSQL和MySQL(各独占一台服务器),中间件两个都写,只从一个读。

posted @ 2023-01-17 09:15  Fun_with_Words  阅读(27)  评论(0编辑  收藏  举报









 张牌。