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

Amit Kapila
Fix uninitialized access to InitialRunningXacts during decoding after ERROR.
The transactions and subtransactions array that was allocated undersnapshot builder memory context and recorded during decoding was notcleared in case of errors. This can result in an assertion failure if weattempt to retry logical decoding within the same session. To address thisissue, we register a callback function under the snapshot builder memorycontext to clear the recorded transactions and subtransactions array alongwith the context.This problem doesn't exist in PG16 and 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).Author: Hou ZhijieReviewed-by: Amit KapilaBackpatch-through: 11Discussion:http://postgr.es/m/18055-ab3beed9f4b7b7d6@postgresql.org1 parent7b03d3a commit7e57208
1 file changed
+16
-4
lines changedLines changed: 16 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
335 | 335 |
| |
336 | 336 |
| |
337 | 337 |
| |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
338 | 349 |
| |
339 | 350 |
| |
340 | 351 |
| |
| |||
350 | 361 |
| |
351 | 362 |
| |
352 | 363 |
| |
| 364 | + | |
353 | 365 |
| |
354 | 366 |
| |
355 | 367 |
| |
| |||
374 | 386 |
| |
375 | 387 |
| |
376 | 388 |
| |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
377 | 393 |
| |
378 | 394 |
| |
379 | 395 |
| |
| |||
399 | 415 |
| |
400 | 416 |
| |
401 | 417 |
| |
402 |
| - | |
403 |
| - | |
404 |
| - | |
405 |
| - | |
406 | 418 |
| |
407 | 419 |
| |
408 | 420 |
| |
|
0 commit comments
Comments
(0)