forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commit132cd58
committed
Fix failure to delete spill files of aborted transactions
Logical decoding's reorderbuffer.c may spill transaction files to diskwhen transactions are large. These are supposed to be removed when theybecome "too old" by xid; but file removal requires the boundary LSNs ofthe transaction to be known. The final_lsn is only set when we see thecommit or abort record for the transaction, but nothing sets the valuefor transactions that crash, so the removal code misbehaves -- inassertion-enabled builds, it crashes by a failed assertion.To fix, modify the final_lsn of transactions that don't have a valueset, to the LSN of the very latest change in the transaction. Thiscauses the spilled files to be removed appropriately.Author: Atsushi TorikoshiReviewed-by: Kyotaro HORIGUCHI, Craig Ringer, Masahiko SawadaDiscussion:https://postgr.es/m/54e4e488-186b-a056-6628-50628e4e4ebc@lab.ntt.co.jp1 parentea4cbf8 commit132cd58
File tree
2 files changed
+19
-2
lines changed- src
- backend/replication/logical
- include/replication
2 files changed
+19
-2
lines changedLines changed: 17 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1689 | 1689 |
| |
1690 | 1690 |
| |
1691 | 1691 |
| |
1692 |
| - | |
1693 |
| - | |
| 1692 | + | |
| 1693 | + | |
1694 | 1694 |
| |
1695 | 1695 |
| |
1696 | 1696 |
| |
| |||
1700 | 1700 |
| |
1701 | 1701 |
| |
1702 | 1702 |
| |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
1703 | 1718 |
| |
1704 | 1719 |
| |
1705 | 1720 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
| 165 | + | |
| 166 | + | |
165 | 167 |
| |
166 | 168 |
| |
167 | 169 |
| |
|
0 commit comments
Comments
(0)