forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitaa9d916

Amit Kapila
Fix uninitialized access to InitialRunningXacts during decoding.
In commit272248a, we introduced an InitialRunningXacts array toremember transactions and subtransactions that were running when thexl_running_xacts record that we decoded was written. This array wasallocated in the snapshot builder memory context after we restoreserialized snapshot but we forgot to reset the array while freeing thebuilder memory context. So, the next time when we start decoding in thesame session where we don't restore any serialized snapshot, we ended upusing the uninitialized array and that can lead to unpredictable behavior.This problem doesn't exist in HEAD as instead of usingInitialRunningXacts, we added the list of transaction IDs andsub-transaction IDs, that have modified catalogs and are running duringsnapshot serialization, to the serialized snapshot (see commit7f13ac8).Reported-by: Maxim OrlovAuthor: Masahiko SawadaReviewed-by: Amit Kapila, Maxim OrlovBackpatch-through: 11Discussion:https://postgr.es/m/CACG=ezZoz_KG+Ryh9MrU_g5e0HiVoHocEvqFF=NRrhrwKmEQJQ@mail.gmail.com1 parentde95928 commitaa9d916
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
| 379 | + | |
| 380 | + | |
| 381 | + | |
379 | 382 |
| |
380 | 383 |
| |
381 | 384 |
| |
| |||
396 | 399 |
| |
397 | 400 |
| |
398 | 401 |
| |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
399 | 406 |
| |
400 | 407 |
| |
401 | 408 |
| |
|
0 commit comments
Comments
(0)