forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit126ec0b
committed
Restore relmapper state early enough in parallel workers.
We need to do RestoreRelationMap before loading catalog-derivedstate, else the worker may end up with catalog relcache entriescontaining stale relfilenode data. Move up RestoreReindexStatetoo, on the principle that that should also happen before wedo much of any catalog access.I think ideally these things would happen even before InitPostgres,but there are various problems standing in the way of that, notablythat the relmapper thinks "active" mappings should be discarded attransaction end. The implication of this is that InitPostgres andRestoreLibraryState will see the same catalog state as an independentbackend would see, which is probably fine; at least, it's been likethat all along.Per report from Justin Pryzby. There is a case to be made thatthis should be back-patched. But given the lack of complaintsbefore6e086fa and the short amount of time remaining before17.0 wraps, I'll just put it in HEAD for now.Discussion:https://postgr.es/m/ZuoU_8EbSTE14o1U@pryzbyj20231 parent91287b5 commit126ec0b
1 file changed
+11
-8
lines changedLines changed: 11 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1420 | 1420 |
| |
1421 | 1421 |
| |
1422 | 1422 |
| |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
1423 | 1434 |
| |
1424 | 1435 |
| |
1425 | 1436 |
| |
| |||
1482 | 1493 |
| |
1483 | 1494 |
| |
1484 | 1495 |
| |
1485 |
| - | |
1486 |
| - | |
1487 |
| - | |
1488 |
| - | |
1489 |
| - | |
1490 |
| - | |
1491 |
| - | |
1492 |
| - | |
1493 | 1496 |
| |
1494 | 1497 |
| |
1495 | 1498 |
| |
|
0 commit comments
Comments
(0)