- Notifications
You must be signed in to change notification settings - Fork5
Commite55704d
committed
Add new wal_level, logical, sufficient for logical decoding.
When wal_level=logical, we'll log columns from the old tuple asconfigured by the REPLICA IDENTITY facility added in commit07cacba. This makes it possiblea properly-configured logical replication solution to correctlyfollow table updates even if they change the chosen key columns,or, with REPLICA IDENTITY FULL, even if the table has no key atall. Note that updates which do not modify the replica identitycolumn won't log anything extra, making the choice of a good key(i.e. one that will rarely be changed) important to performancewhen wal_level=logical is configured.Each insert, update, or delete to a catalog table will also logthe CMIN and/or CMAX values of stamped by the current transaction.This is necessary because logical decoding will require access tohistorical snapshots of the catalog in order to decode some datatypes, and the CMIN/CMAX values that we may need in order to judgerow visibility may have been overwritten by the time we need them.Andres Freund, reviewed in various versions by myself, HeikkiLinnakangas, KONDO Mitsumasa, and many others.1 parent9ec6199 commite55704d
File tree
22 files changed
+745
-157
lines changed- doc/src/sgml
- src
- backend
- access
- heap
- rmgrdesc
- transam
- catalog
- commands
- postmaster
- utils
- cache
- misc
- bin/pg_controldata
- include
- access
- utils
- tools/pgindent
22 files changed
+745
-157
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
587 | 587 |
| |
588 | 588 |
| |
589 | 589 |
| |
590 |
| - | |
| 590 | + | |
591 | 591 |
| |
592 | 592 |
| |
593 | 593 |
| |
| |||
1259 | 1259 |
| |
1260 | 1260 |
| |
1261 | 1261 |
| |
1262 |
| - | |
| 1262 | + | |
1263 | 1263 |
| |
1264 | 1264 |
| |
1265 | 1265 |
| |
|
Lines changed: 26 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1648 | 1648 |
| |
1649 | 1649 |
| |
1650 | 1650 |
| |
1651 |
| - | |
1652 |
| - | |
1653 |
| - | |
1654 |
| - | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
1655 | 1657 |
| |
1656 | 1658 |
| |
1657 | 1659 |
| |
| |||
1665 | 1667 |
| |
1666 | 1668 |
| |
1667 | 1669 |
| |
1668 |
| - | |
1669 |
| - | |
1670 |
| - | |
1671 |
| - | |
1672 |
| - | |
1673 |
| - | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
1674 | 1674 |
| |
1675 | 1675 |
| |
1676 | 1676 |
| |
1677 | 1677 |
| |
1678 | 1678 |
| |
1679 | 1679 |
| |
1680 |
| - | |
| 1680 | + | |
1681 | 1681 |
| |
1682 |
| - | |
1683 |
| - | |
1684 |
| - | |
1685 |
| - | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
1686 | 1694 |
| |
1687 | 1695 |
| |
1688 | 1696 |
| |
| |||
2239 | 2247 |
| |
2240 | 2248 |
| |
2241 | 2249 |
| |
2242 |
| - | |
2243 |
| - | |
2244 |
| - | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
2245 | 2253 |
| |
2246 | 2254 |
| |
2247 | 2255 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1861 | 1861 |
| |
1862 | 1862 |
| |
1863 | 1863 |
| |
1864 |
| - | |
1865 |
| - | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
1866 | 1867 |
| |
1867 | 1868 |
| |
1868 | 1869 |
| |
|
0 commit comments
Comments
(0)