Commit 8f14a6e
committed
Fix INSERT EXEC stale OID errors in major version upgrade tests
Add PG_TRY/PG_CATCH protection to LockRelationOid and table_open calls
in pltsql_insert_exec_open_target_table(). During major version upgrades,
table OIDs can become stale between RangeVarGetRelid and subsequent
operations. This fix gracefully handles such scenarios by catching errors
and skipping schema capture rather than propagating the error.
This addresses 'could not open relation with OID' errors seen in
BABEL-1944 during version upgrade CI tests.1 parent 112b039 commit 8f14a6e
1 file changed
+44
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
437 | 440 | | |
438 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
439 | 460 | | |
440 | 461 | | |
441 | 462 | | |
442 | 463 | | |
443 | 464 | | |
444 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
445 | 469 | | |
446 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
447 | 489 | | |
448 | 490 | | |
449 | 491 | | |
| |||
0 commit comments