forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc35ba14
committed
Future-proof the recursion inside ExecShutdownNode().
The API contract for planstate_tree_walker() callbacks is that theytake a PlanState pointer and a context pointer. Somebody figuredthey could save a couple lines of code by ignoring that, and passingExecShutdownNode itself as the walker even though it has but oneargument. Somewhat remarkably, we've gotten away with that so far.However, it seems clear that the upcoming C2x standard means toforbid such cases, and compilers that actively break such codelikely won't be far behind. So spend the extra few lines of codeto do it honestly with a separate walker function.In HEAD, we might as well go further and remove ExecShutdownNode'suseless return value. I left that as-is in back branches though,to forestall complaints about ABI breakage.Back-patch, with the thought that this might become of practicalimportance before our stable branches are all out of service.It doesn't seem to be fixing any live bug on any currently knownplatform, however.Discussion:https://postgr.es/m/208054.1663534665@sss.pgh.pa.us1 parent4fd1479 commitc35ba14
File tree
3 files changed
+11
-4
lines changed- src
- backend/executor
- include/executor
3 files changed
+11
-4
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1691 | 1691 |
| |
1692 | 1692 |
| |
1693 | 1693 |
| |
1694 |
| - | |
| 1694 | + | |
1695 | 1695 |
| |
1696 | 1696 |
| |
1697 | 1697 |
| |
|
Lines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| 124 | + | |
124 | 125 |
| |
125 | 126 |
| |
126 | 127 |
| |
| |||
768 | 769 |
| |
769 | 770 |
| |
770 | 771 |
| |
771 |
| - | |
| 772 | + | |
772 | 773 |
| |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
773 | 780 |
| |
774 | 781 |
| |
775 | 782 |
| |
| |||
789 | 796 |
| |
790 | 797 |
| |
791 | 798 |
| |
792 |
| - | |
| 799 | + | |
793 | 800 |
| |
794 | 801 |
| |
795 | 802 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
239 | 239 |
| |
240 | 240 |
| |
241 | 241 |
| |
242 |
| - | |
| 242 | + | |
243 | 243 |
| |
244 | 244 |
| |
245 | 245 |
| |
|
0 commit comments
Comments
(0)