forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2594cf0
committed
Revise the API for GUC variable assign hooks.
The previous functions of assign hooks are now split between check hooksand assign hooks, where the former can fail but the latter shouldn't.Aside from being conceptually clearer, this approach exposes the"canonicalized" form of the variable value to guc.c without having to doan actual assignment. And that lets us fix the problem recently noted byBernd Helmle that the auto-tune patch for wal_buffers resulted in boguslog messages about "parameter "wal_buffers" cannot be changed withoutrestarting the server". There may be some speed advantage too, becausethis design lets hook functions avoid re-parsing variable values whenrestoring a previous state after a rollback (they can store a pre-parsedrepresentation of the value instead). This patch also resolves alongstanding annoyance about custom error messages from variable assignhooks: they should modify, not appear separately from, guc.c's own messageabout "invalid parameter value".1 parent5d0e462 commit2594cf0
File tree
35 files changed
+2611
-1854
lines changed- contrib
- auth_delay
- auto_explain
- pg_stat_statements
- sepgsql
- src
- backend
- access/transam
- catalog
- commands
- replication
- tcop
- utils
- adt
- cache
- error
- mb
- misc
- include
- commands
- mb
- replication
- tcop
- tsearch
- utils
- pl
- plperl
- plpgsql/src
- test/regress/expected
- timezone
35 files changed
+2611
-1854
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
| 66 | + | |
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
| 77 | + | |
77 | 78 |
| |
78 | 79 |
| |
79 | 80 |
| |
| |||
84 | 85 |
| |
85 | 86 |
| |
86 | 87 |
| |
| 88 | + | |
87 | 89 |
| |
88 | 90 |
| |
89 | 91 |
| |
| |||
94 | 96 |
| |
95 | 97 |
| |
96 | 98 |
| |
| 99 | + | |
97 | 100 |
| |
98 | 101 |
| |
99 | 102 |
| |
| |||
104 | 107 |
| |
105 | 108 |
| |
106 | 109 |
| |
| 110 | + | |
107 | 111 |
| |
108 | 112 |
| |
109 | 113 |
| |
| |||
115 | 119 |
| |
116 | 120 |
| |
117 | 121 |
| |
| 122 | + | |
118 | 123 |
| |
119 | 124 |
| |
120 | 125 |
| |
| |||
125 | 130 |
| |
126 | 131 |
| |
127 | 132 |
| |
| 133 | + | |
128 | 134 |
| |
129 | 135 |
| |
130 | 136 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
| 222 | + | |
222 | 223 |
| |
223 | 224 |
| |
224 | 225 |
| |
| |||
230 | 231 |
| |
231 | 232 |
| |
232 | 233 |
| |
| 234 | + | |
233 | 235 |
| |
234 | 236 |
| |
235 | 237 |
| |
| |||
240 | 242 |
| |
241 | 243 |
| |
242 | 244 |
| |
| 245 | + | |
243 | 246 |
| |
244 | 247 |
| |
245 | 248 |
| |
| |||
250 | 253 |
| |
251 | 254 |
| |
252 | 255 |
| |
| 256 | + | |
253 | 257 |
| |
254 | 258 |
| |
255 | 259 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
| 397 | + | |
397 | 398 |
| |
398 | 399 |
| |
399 | 400 |
| |
| |||
412 | 413 |
| |
413 | 414 |
| |
414 | 415 |
| |
| 416 | + | |
415 | 417 |
| |
416 | 418 |
| |
417 | 419 |
| |
|
Lines changed: 63 additions & 33 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4887 | 4887 |
| |
4888 | 4888 |
| |
4889 | 4889 |
| |
4890 |
| - | |
4891 |
| - | |
4892 |
| - | |
4893 |
| - | |
4894 |
| - | |
4895 |
| - | |
4896 |
| - | |
| 4890 | + | |
| 4891 | + | |
| 4892 | + | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
4897 | 4897 |
| |
4898 |
| - | |
4899 |
| - | |
| 4898 | + | |
| 4899 | + | |
4900 | 4900 |
| |
4901 |
| - | |
4902 |
| - | |
| 4901 | + | |
4903 | 4902 |
| |
4904 |
| - | |
4905 |
| - | |
4906 |
| - | |
4907 |
| - | |
4908 |
| - | |
4909 |
| - | |
4910 |
| - | |
4911 |
| - | |
4912 |
| - | |
4913 |
| - | |
| 4903 | + | |
| 4904 | + | |
| 4905 | + | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
4914 | 4910 |
| |
4915 |
| - | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
4916 | 4921 |
| |
4917 |
| - | |
4918 |
| - | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
| 4930 | + | |
4919 | 4931 |
| |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
| 4938 | + | |
| 4939 | + | |
| 4940 | + | |
| 4941 | + | |
| 4942 | + | |
| 4943 | + | |
4920 | 4944 |
| |
4921 | 4945 |
| |
4922 | 4946 |
| |
| |||
4927 | 4951 |
| |
4928 | 4952 |
| |
4929 | 4953 |
| |
4930 |
| - | |
4931 |
| - | |
| 4954 | + | |
| 4955 | + | |
| 4956 | + | |
| 4957 | + | |
| 4958 | + | |
| 4959 | + | |
| 4960 | + | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
| 4966 | + | |
4932 | 4967 |
| |
4933 | 4968 |
| |
4934 | 4969 |
| |
| |||
8653 | 8688 |
| |
8654 | 8689 |
| |
8655 | 8690 |
| |
8656 |
| - | |
8657 |
| - | |
| 8691 | + | |
| 8692 | + | |
8658 | 8693 |
| |
8659 |
| - | |
8660 |
| - | |
8661 |
| - | |
8662 | 8694 |
| |
8663 | 8695 |
| |
8664 | 8696 |
| |
| |||
8678 | 8710 |
| |
8679 | 8711 |
| |
8680 | 8712 |
| |
8681 |
| - | |
8682 |
| - | |
8683 | 8713 |
| |
8684 | 8714 |
| |
8685 | 8715 |
| |
|
Lines changed: 30 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3468 | 3468 |
| |
3469 | 3469 |
| |
3470 | 3470 |
| |
3471 |
| - | |
3472 |
| - | |
3473 |
| - | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
3474 | 3474 |
| |
| 3475 | + | |
3475 | 3476 |
| |
3476 | 3477 |
| |
3477 | 3478 |
| |
3478 | 3479 |
| |
3479 | 3480 |
| |
3480 |
| - | |
| 3481 | + | |
3481 | 3482 |
| |
3482 | 3483 |
| |
3483 | 3484 |
| |
3484 | 3485 |
| |
3485 | 3486 |
| |
| 3487 | + | |
3486 | 3488 |
| |
3487 | 3489 |
| |
3488 |
| - | |
| 3490 | + | |
3489 | 3491 |
| |
3490 | 3492 |
| |
3491 | 3493 |
| |
3492 | 3494 |
| |
3493 | 3495 |
| |
3494 | 3496 |
| |
3495 |
| - | |
| 3497 | + | |
3496 | 3498 |
| |
3497 | 3499 |
| |
3498 | 3500 |
| |
| |||
3504 | 3506 |
| |
3505 | 3507 |
| |
3506 | 3508 |
| |
3507 |
| - | |
| 3509 | + | |
3508 | 3510 |
| |
3509 | 3511 |
| |
3510 | 3512 |
| |
| |||
3516 | 3518 |
| |
3517 | 3519 |
| |
3518 | 3520 |
| |
3519 |
| - | |
3520 |
| - | |
3521 |
| - | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
3522 | 3533 |
| |
3523 | 3534 |
| |
3524 | 3535 |
| |
3525 | 3536 |
| |
3526 | 3537 |
| |
3527 | 3538 |
| |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
3528 | 3546 |
| |
3529 | 3547 |
| |
3530 | 3548 |
| |
3531 |
| - | |
| 3549 | + | |
3532 | 3550 |
| |
3533 |
| - | |
3534 |
| - | |
3535 |
| - | |
3536 |
| - | |
| 3551 | + | |
3537 | 3552 |
| |
3538 | 3553 |
| |
3539 | 3554 |
| |
|
0 commit comments
Comments
(0)