forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5fa6b0d
committed
Remove unnecessary PG_TRY overhead for CurrentResourceOwner changes.
resowner/README contained advice to use a PG_TRY block to restore theold CurrentResourceOwner value anywhere that that variable is transientlychanged. That advice was only inconsistently followed, however, andon reflection it seems like unnecessary overhead. We don't botherwith such a convention for transient CurrentMemoryContext changes,on the grounds that any (sub)transaction abort will start out byresetting CurrentMemoryContext to what it wants. But the same istrue of CurrentResourceOwner, so there seems no need to treat itdifferently.Hence, remove PG_TRY blocks that exist only to restore CurrentResourceOwnerbefore re-throwing the error. There are a couple of places that restoreit along with some other actions, and I left those alone; the restore isprobably unnecessary but no noticeable gain will result from removing it.Discussion:https://postgr.es/m/5236.1507583529@sss.pgh.pa.us1 parentf676616 commit5fa6b0d
File tree
7 files changed
+42
-116
lines changed- src/backend
- access/transam
- commands
- storage/large_object
- utils/resowner
7 files changed
+42
-116
lines changedLines changed: 4 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
575 | 575 |
| |
576 | 576 |
| |
577 | 577 |
| |
578 |
| - | |
579 |
| - | |
580 |
| - | |
581 |
| - | |
582 |
| - | |
583 |
| - | |
584 |
| - | |
585 |
| - | |
586 |
| - | |
587 |
| - | |
588 |
| - | |
589 |
| - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
590 | 582 |
| |
591 | 583 |
| |
592 | 584 |
| |
|
Lines changed: 7 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
294 | 294 |
| |
295 | 295 |
| |
296 | 296 |
| |
297 |
| - | |
298 |
| - | |
299 |
| - | |
300 |
| - | |
301 |
| - | |
302 |
| - | |
303 |
| - | |
304 |
| - | |
305 |
| - | |
306 |
| - | |
307 |
| - | |
308 |
| - | |
309 |
| - | |
310 |
| - | |
311 |
| - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
312 | 304 |
| |
313 | 305 |
| |
314 | 306 |
| |
|
Lines changed: 4 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1055 | 1055 |
| |
1056 | 1056 |
| |
1057 | 1057 |
| |
1058 |
| - | |
1059 |
| - | |
1060 |
| - | |
1061 |
| - | |
1062 |
| - | |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
1066 |
| - | |
1067 |
| - | |
1068 |
| - | |
1069 |
| - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1070 | 1062 |
| |
1071 | 1063 |
| |
1072 | 1064 |
| |
|
Lines changed: 11 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3639 | 3639 |
| |
3640 | 3640 |
| |
3641 | 3641 |
| |
3642 |
| - | |
3643 |
| - | |
3644 |
| - | |
3645 |
| - | |
3646 |
| - | |
3647 |
| - | |
3648 |
| - | |
3649 |
| - | |
3650 |
| - | |
3651 |
| - | |
3652 |
| - | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
3653 | 3646 |
| |
3654 | 3647 |
| |
3655 | 3648 |
| |
| |||
4468 | 4461 |
| |
4469 | 4462 |
| |
4470 | 4463 |
| |
4471 |
| - | |
4472 |
| - | |
4473 |
| - | |
4474 |
| - | |
4475 |
| - | |
4476 |
| - | |
4477 |
| - | |
4478 |
| - | |
4479 |
| - | |
4480 |
| - | |
4481 |
| - | |
4482 |
| - | |
4483 |
| - | |
4484 |
| - | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
4485 | 4471 |
| |
4486 | 4472 |
| |
4487 | 4473 |
| |
|
Lines changed: 13 additions & 31 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 |
| |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 | 86 |
| |
96 | 87 |
| |
97 | 88 |
| |
| |||
112 | 103 |
| |
113 | 104 |
| |
114 | 105 |
| |
115 |
| - | |
116 |
| - | |
117 |
| - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
118 | 112 |
| |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
130 |
| - | |
131 | 113 |
| |
132 | 114 |
| |
133 | 115 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - |
Lines changed: 3 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
473 | 473 |
| |
474 | 474 |
| |
475 | 475 |
| |
476 |
| - | |
477 |
| - | |
478 |
| - | |
479 |
| - | |
480 |
| - | |
481 |
| - | |
482 |
| - | |
483 |
| - | |
484 |
| - | |
485 |
| - | |
486 |
| - | |
487 |
| - | |
488 |
| - | |
489 |
| - | |
490 |
| - | |
| 476 | + | |
| 477 | + | |
491 | 478 |
| |
492 | 479 |
| |
493 | 480 |
| |
| |||
507 | 494 |
| |
508 | 495 |
| |
509 | 496 |
| |
510 |
| - | |
511 |
| - | |
| 497 | + | |
512 | 498 |
| |
513 | 499 |
| |
514 | 500 |
| |
|
0 commit comments
Comments
(0)