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

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 parent5dc093e commitc570bb4
1 file changed
+16
-4
lines changedLines changed: 16 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
330 | 330 |
| |
331 | 331 |
| |
332 | 332 |
| |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
333 | 344 |
| |
334 | 345 |
| |
335 | 346 |
| |
| |||
345 | 356 |
| |
346 | 357 |
| |
347 | 358 |
| |
| 359 | + | |
348 | 360 |
| |
349 | 361 |
| |
350 | 362 |
| |
| |||
369 | 381 |
| |
370 | 382 |
| |
371 | 383 |
| |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
372 | 388 |
| |
373 | 389 |
| |
374 | 390 |
| |
| |||
394 | 410 |
| |
395 | 411 |
| |
396 | 412 |
| |
397 |
| - | |
398 |
| - | |
399 |
| - | |
400 |
| - | |
401 | 413 |
| |
402 | 414 |
| |
403 | 415 |
| |
|
0 commit comments
Comments
(0)