forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit32d5a49
committed
Replace RelationOpenSmgr() with RelationGetSmgr().
This is a back-patch of the v15-era commitf10f0ae into oldersupported branches. The idea is to design out bugs in which anill-timed relcache flush clears rel->rd_smgr partway throughsome code sequence that wasn't expecting that. We had anotherreport today of a corner case that reliably crashes v14 underdebug_discard_caches (nee CLOBBER_CACHE_ALWAYS), and thereforewould crash once in a blue moon in the field. We're unlikelyto get rid of all such code paths unless we adopt the morerigorous coding rules instituted byf10f0ae. Therefore,even though this is a bit invasive, it's time to back-patch.Some comfort can be taken in the fact thatf10f0ae has beenin v15 for 16 months without problems.I left the RelationOpenSmgr macro present in the back branches,even though no core code should use it anymore, in order to not breakthird-party extensions in minor releases. Such extensions might optto start using RelationGetSmgr instead, to reduce their codedifferential between v15 and earlier branches. This carries a hazardof failing to compile against headers from existing minor releases.However, once compiled the extension should work fine even with suchreleases, because RelationGetSmgr is a "static inline" function soit creates no link-time dependency. So depending on distributionpractices, that might be an OK tradeoff.Per report from Spyridon Dimitrios Agathos. Original patchby Amul Sul.Discussion:https://postgr.es/m/CAFM5RaqdgyusQvmWkyPYaWMwoK5gigdtW-7HcgHgOeAw7mqJ_Q@mail.gmail.comDiscussion:https://postgr.es/m/CANiYTQsU7yMFpQYnv=BrcRVqK_3U3mtAzAsJCaqtzsDHfsUbdQ@mail.gmail.com1 parentaaf28c9 commit32d5a49
File tree
21 files changed
+171
-162
lines changed- contrib
- amcheck
- bloom
- pg_prewarm
- pg_visibility
- src
- backend
- access
- gist
- hash
- heap
- nbtree
- spgist
- table
- catalog
- commands
- storage
- buffer
- freespace
- include/utils
21 files changed
+171
-162
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
322 | 322 |
| |
323 | 323 |
| |
324 | 324 |
| |
325 |
| - | |
326 |
| - | |
| 325 | + | |
327 | 326 |
| |
328 | 327 |
| |
329 | 328 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
| 180 | + | |
181 | 181 |
| |
182 |
| - | |
| 182 | + | |
183 | 183 |
| |
184 | 184 |
| |
185 | 185 |
| |
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 |
| - | |
| 190 | + | |
191 | 191 |
| |
192 | 192 |
| |
193 | 193 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
514 | 514 |
| |
515 | 515 |
| |
516 | 516 |
| |
517 |
| - | |
518 |
| - | |
519 | 517 |
| |
520 | 518 |
| |
521 | 519 |
| |
522 | 520 |
| |
523 | 521 |
| |
524 | 522 |
| |
525 |
| - | |
| 523 | + | |
526 | 524 |
| |
527 | 525 |
| |
528 | 526 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
112 |
| - | |
113 |
| - | |
| 112 | + | |
114 | 113 |
| |
115 | 114 |
| |
116 | 115 |
| |
| |||
178 | 177 |
| |
179 | 178 |
| |
180 | 179 |
| |
181 |
| - | |
| 180 | + | |
182 | 181 |
| |
183 | 182 |
| |
184 | 183 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
391 | 391 |
| |
392 | 392 |
| |
393 | 393 |
| |
394 |
| - | |
395 |
| - | |
| 394 | + | |
| 395 | + | |
396 | 396 |
| |
397 | 397 |
| |
398 | 398 |
| |
399 | 399 |
| |
400 | 400 |
| |
401 |
| - | |
| 401 | + | |
402 | 402 |
| |
403 | 403 |
| |
404 | 404 |
| |
|
Lines changed: 7 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
409 | 409 |
| |
410 | 410 |
| |
411 | 411 |
| |
412 |
| - | |
413 |
| - | |
| 412 | + | |
414 | 413 |
| |
415 | 414 |
| |
416 | 415 |
| |
| |||
450 | 449 |
| |
451 | 450 |
| |
452 | 451 |
| |
453 |
| - | |
454 | 452 |
| |
455 | 453 |
| |
456 |
| - | |
| 454 | + | |
457 | 455 |
| |
458 | 456 |
| |
459 | 457 |
| |
| |||
472 | 470 |
| |
473 | 471 |
| |
474 | 472 |
| |
475 |
| - | |
476 |
| - | |
477 |
| - | |
478 |
| - | |
| 473 | + | |
479 | 474 |
| |
480 | 475 |
| |
481 | 476 |
| |
| |||
577 | 572 |
| |
578 | 573 |
| |
579 | 574 |
| |
580 |
| - | |
581 |
| - | |
582 | 575 |
| |
583 | 576 |
| |
584 | 577 |
| |
| |||
590 | 583 |
| |
591 | 584 |
| |
592 | 585 |
| |
593 |
| - | |
| 586 | + | |
| 587 | + | |
594 | 588 |
| |
595 | 589 |
| |
596 | 590 |
| |
| |||
875 | 869 |
| |
876 | 870 |
| |
877 | 871 |
| |
878 |
| - | |
| 872 | + | |
| 873 | + | |
879 | 874 |
| |
880 | 875 |
| |
881 | 876 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1028 | 1028 |
| |
1029 | 1029 |
| |
1030 | 1030 |
| |
1031 |
| - | |
1032 | 1031 |
| |
1033 |
| - | |
| 1032 | + | |
| 1033 | + | |
1034 | 1034 |
| |
1035 | 1035 |
| |
1036 | 1036 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
628 | 628 |
| |
629 | 629 |
| |
630 | 630 |
| |
631 |
| - | |
632 | 631 |
| |
633 | 632 |
| |
634 | 633 |
| |
| |||
648 | 647 |
| |
649 | 648 |
| |
650 | 649 |
| |
651 |
| - | |
| 650 | + | |
652 | 651 |
| |
653 | 652 |
| |
654 | 653 |
| |
655 | 654 |
| |
656 | 655 |
| |
657 | 656 |
| |
658 |
| - | |
| 657 | + | |
659 | 658 |
| |
660 | 659 |
| |
661 | 660 |
| |
| |||
667 | 666 |
| |
668 | 667 |
| |
669 | 668 |
| |
670 |
| - | |
| 669 | + | |
671 | 670 |
| |
672 | 671 |
| |
673 | 672 |
| |
|
Lines changed: 4 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
329 |
| - | |
330 |
| - | |
331 |
| - | |
| 329 | + | |
| 330 | + | |
332 | 331 |
| |
333 | 332 |
| |
334 | 333 |
| |
| |||
339 | 338 |
| |
340 | 339 |
| |
341 | 340 |
| |
342 |
| - | |
343 |
| - | |
344 |
| - | |
345 |
| - | |
346 |
| - | |
| 341 | + | |
347 | 342 |
| |
348 | 343 |
| |
349 | 344 |
| |
| |||
695 | 690 |
| |
696 | 691 |
| |
697 | 692 |
| |
698 |
| - | |
699 |
| - | |
700 | 693 |
| |
701 | 694 |
| |
702 |
| - | |
| 695 | + | |
703 | 696 |
| |
704 | 697 |
| |
705 | 698 |
| |
|
Lines changed: 27 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
455 | 455 |
| |
456 | 456 |
| |
457 | 457 |
| |
458 |
| - | |
459 |
| - | |
460 | 458 |
| |
461 | 459 |
| |
462 | 460 |
| |
463 | 461 |
| |
464 |
| - | |
| 462 | + | |
465 | 463 |
| |
466 | 464 |
| |
467 | 465 |
| |
| |||
528 | 526 |
| |
529 | 527 |
| |
530 | 528 |
| |
531 |
| - | |
| 529 | + | |
532 | 530 |
| |
533 | 531 |
| |
534 | 532 |
| |
| |||
547 | 545 |
| |
548 | 546 |
| |
549 | 547 |
| |
| 548 | + | |
550 | 549 |
| |
551 | 550 |
| |
552 |
| - | |
553 |
| - | |
554 |
| - | |
555 |
| - | |
556 |
| - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
557 | 554 |
| |
558 |
| - | |
| 555 | + | |
559 | 556 |
| |
560 | 557 |
| |
561 | 558 |
| |
562 | 559 |
| |
563 | 560 |
| |
564 |
| - | |
| 561 | + | |
565 | 562 |
| |
566 |
| - | |
567 |
| - | |
| 563 | + | |
| 564 | + | |
568 | 565 |
| |
569 |
| - | |
| 566 | + | |
570 | 567 |
| |
571 | 568 |
| |
572 | 569 |
| |
573 |
| - | |
| 570 | + | |
574 | 571 |
| |
575 | 572 |
| |
576 | 573 |
| |
| |||
618 | 615 |
| |
619 | 616 |
| |
620 | 617 |
| |
| 618 | + | |
621 | 619 |
| |
622 | 620 |
| |
623 | 621 |
| |
| |||
633 | 631 |
| |
634 | 632 |
| |
635 | 633 |
| |
636 |
| - | |
637 |
| - | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
638 | 640 |
| |
639 | 641 |
| |
640 | 642 |
| |
641 | 643 |
| |
642 | 644 |
| |
643 |
| - | |
644 |
| - | |
645 |
| - | |
646 |
| - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
647 | 649 |
| |
648 | 650 |
| |
649 |
| - | |
650 |
| - | |
| 651 | + | |
| 652 | + | |
651 | 653 |
| |
652 | 654 |
| |
653 | 655 |
| |
654 | 656 |
| |
655 | 657 |
| |
656 | 658 |
| |
657 |
| - | |
658 |
| - | |
| 659 | + | |
659 | 660 |
| |
660 | 661 |
| |
661 | 662 |
| |
| |||
666 | 667 |
| |
667 | 668 |
| |
668 | 669 |
| |
669 |
| - | |
| 670 | + | |
670 | 671 |
| |
671 | 672 |
| |
672 | 673 |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
166 |
| - | |
| 166 | + | |
167 | 167 |
| |
168 |
| - | |
| 168 | + | |
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
176 |
| - | |
| 176 | + | |
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
|
0 commit comments
Comments
(0)