forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0e2c05a
committed
Prevent tuples to be marked as dead in subtransactions on standbys
Dead tuples are ignored and are not marked as dead during recovery, asit can lead to MVCC issues on a standby because its xmin may not matchwith the primary. This information is tracked by a field called"xactStartedInRecovery" in the transaction state data, switched on whenstarting a transaction in recovery.Unfortunately, this information was not correctly tracked when startinga subtransaction, because the transaction state used for thesubtransaction did not update "xactStartedInRecovery" based on the stateof its parent. This would cause index scans done in subtransactions toreturn inconsistent data, depending on how the xmin of the primaryand/or the standby evolved.This is broken since the introduction of hot standby inefc16ea, sobackpatch all the way down.Author: Fei ChanghongReviewed-by: Kyotaro HoriguchiDiscussion:https://postgr.es/m/tencent_C4D907A5093C071A029712E73B43C6512706@qq.comBackpatch-through: 121 parent810c960 commit0e2c05a
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5285 | 5285 |
| |
5286 | 5286 |
| |
5287 | 5287 |
| |
| 5288 | + | |
5288 | 5289 |
| |
5289 | 5290 |
| |
5290 | 5291 |
| |
|
0 commit comments
Comments
(0)