forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0fc9434
committed
Initialize tsId and dbId fields in WAL record of COMMIT PREPARED.
Commitdd428c7 added dbId and tsId to the xl_xact_commit struct but missedthat prepared transaction commits reuse that struct. Fix that.Because those fields were left unitialized, replaying a commit prepared WALrecord in a hot standby node would fail to remove the relcache init file.That can lead to "could not open file" errors on the standby. Relcache initfile only needs to be removed when a system table/index is rewritten in thetransaction using two phase commit, so that should be rare in practice. InHEAD, the incorrect dbId/tsId values are also used for filtering in logicalreplication code, causing the transaction to always be filtered out.Analysis and fix by Andres Freund. Backpatch to 9.0 where hot standby wasintroduced.1 parent9fb8cd2 commit0fc9434
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2035 | 2035 |
| |
2036 | 2036 |
| |
2037 | 2037 |
| |
2038 |
| - | |
| 2038 | + | |
2039 | 2039 |
| |
2040 |
| - | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
2041 | 2045 |
| |
2042 | 2046 |
| |
2043 | 2047 |
| |
|
0 commit comments
Comments
(0)