forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3ec20c7
committed
Fix EXPLAIN (SETTINGS) to follow policy about when to print empty fields.
In non-TEXT output formats, the "Settings" field should appear whenrequested, even if it would be empty.Also, get rid of the premature optimization of counting all theGUC_EXPLAIN variables at startup. Since there was no provision foradjusting that count later, all it'd take would be some extension markinga parameter as GUC_EXPLAIN to risk an assertion failure or memory stomp.We could make get_explain_guc_options() count those variables on-the-fly,or dynamically resize its array ... but TBH I do not think that making atransient array of pointers a bit smaller is worth any extra complication,especially when you consider all the other transient space EXPLAIN eats.So just allocate that array at the max possible size.In HEAD, also add some regression test coverage for this feature.Because of the memory-stomp hazard, back-patch to v12 where thisfeature was added.Discussion:https://postgr.es/m/19416.1580069629@sss.pgh.pa.us1 parentf37ff03 commit3ec20c7
File tree
4 files changed
+54
-50
lines changed- src
- backend
- commands
- utils/misc
- test/regress
- expected
- sql
4 files changed
+54
-50
lines changedLines changed: 7 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
626 | 626 |
| |
627 | 627 |
| |
628 | 628 |
| |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
633 | 629 |
| |
634 | 630 |
| |
635 |
| - | |
636 |
| - | |
637 | 631 |
| |
638 | 632 |
| |
639 |
| - | |
| 633 | + | |
640 | 634 |
| |
641 | 635 |
| |
642 | 636 |
| |
| |||
650 | 644 |
| |
651 | 645 |
| |
652 | 646 |
| |
653 |
| - | |
654 | 647 |
| |
655 | 648 |
| |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
656 | 653 |
| |
657 | 654 |
| |
658 |
| - | |
| 655 | + | |
659 | 656 |
| |
660 | 657 |
| |
661 | 658 |
| |
| |||
671 | 668 |
| |
672 | 669 |
| |
673 | 670 |
| |
674 |
| - | |
675 |
| - | |
| 671 | + | |
676 | 672 |
| |
677 | 673 |
| |
678 | 674 |
| |
|
Lines changed: 15 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4663 | 4663 |
| |
4664 | 4664 |
| |
4665 | 4665 |
| |
4666 |
| - | |
4667 |
| - | |
4668 |
| - | |
4669 | 4666 |
| |
4670 | 4667 |
| |
4671 | 4668 |
| |
| |||
4929 | 4926 |
| |
4930 | 4927 |
| |
4931 | 4928 |
| |
4932 |
| - | |
4933 | 4929 |
| |
4934 | 4930 |
| |
4935 | 4931 |
| |
| |||
4940 | 4936 |
| |
4941 | 4937 |
| |
4942 | 4938 |
| |
4943 |
| - | |
4944 |
| - | |
4945 |
| - | |
4946 | 4939 |
| |
4947 | 4940 |
| |
4948 | 4941 |
| |
| |||
4951 | 4944 |
| |
4952 | 4945 |
| |
4953 | 4946 |
| |
4954 |
| - | |
4955 |
| - | |
4956 |
| - | |
4957 | 4947 |
| |
4958 | 4948 |
| |
4959 | 4949 |
| |
| |||
4962 | 4952 |
| |
4963 | 4953 |
| |
4964 | 4954 |
| |
4965 |
| - | |
4966 |
| - | |
4967 |
| - | |
4968 | 4955 |
| |
4969 | 4956 |
| |
4970 | 4957 |
| |
| |||
4973 | 4960 |
| |
4974 | 4961 |
| |
4975 | 4962 |
| |
4976 |
| - | |
4977 |
| - | |
4978 |
| - | |
4979 | 4963 |
| |
4980 | 4964 |
| |
4981 | 4965 |
| |
| |||
4984 | 4968 |
| |
4985 | 4969 |
| |
4986 | 4970 |
| |
4987 |
| - | |
4988 |
| - | |
4989 |
| - | |
4990 | 4971 |
| |
4991 | 4972 |
| |
4992 | 4973 |
| |
| |||
5018 | 4999 |
| |
5019 | 5000 |
| |
5020 | 5001 |
| |
5021 |
| - | |
5022 | 5002 |
| |
5023 | 5003 |
| |
5024 | 5004 |
| |
| |||
8967 | 8947 |
| |
8968 | 8948 |
| |
8969 | 8949 |
| |
8970 |
| - | |
8971 |
| - | |
8972 |
| - | |
| 8950 | + | |
| 8951 | + | |
| 8952 | + | |
| 8953 | + | |
8973 | 8954 |
| |
8974 | 8955 |
| |
8975 | 8956 |
| |
8976 | 8957 |
| |
8977 |
| - | |
8978 | 8958 |
| |
8979 | 8959 |
| |
8980 | 8960 |
| |
8981 | 8961 |
| |
8982 | 8962 |
| |
8983 |
| - | |
8984 |
| - | |
8985 |
| - | |
| 8963 | + | |
| 8964 | + | |
8986 | 8965 |
| |
8987 |
| - | |
| 8966 | + | |
8988 | 8967 |
| |
8989 |
| - | |
| 8968 | + | |
8990 | 8969 |
| |
8991 | 8970 |
| |
8992 | 8971 |
| |
8993 | 8972 |
| |
8994 |
| - | |
| 8973 | + | |
| 8974 | + | |
| 8975 | + | |
| 8976 | + | |
| 8977 | + | |
8995 | 8978 |
| |
8996 | 8979 |
| |
8997 | 8980 |
| |
8998 | 8981 |
| |
8999 | 8982 |
| |
9000 |
| - | |
9001 |
| - | |
9002 |
| - | |
9003 |
| - | |
9004 |
| - | |
| 8983 | + | |
9005 | 8984 |
| |
9006 | 8985 |
| |
9007 | 8986 |
| |
| |||
9050 | 9029 |
| |
9051 | 9030 |
| |
9052 | 9031 |
| |
9053 |
| - | |
9054 | 9032 |
| |
9055 | 9033 |
| |
9056 | 9034 |
| |
9057 |
| - | |
| 9035 | + | |
9058 | 9036 |
| |
9059 | 9037 |
| |
9060 |
| - | |
9061 |
| - | |
9062 | 9038 |
| |
9063 | 9039 |
| |
9064 | 9040 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
184 | 204 |
| |
185 | 205 |
| |
186 | 206 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
60 | 72 |
| |
61 | 73 |
| |
62 | 74 |
| |
|
0 commit comments
Comments
(0)