forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3853664
committed
Introduce GUC_NO_RESET flag.
Previously, the transaction-property GUCs such as transaction_isolationcould be reset after starting a transaction, because we marked themas GUC_NO_RESET_ALL but still allowed a targeted RESET. That leads toassertion failures or worse, because those properties aren't supposedto change after we've acquired a transaction snapshot.There are some NO_RESET_ALL variables for which RESET is okay, sowe can't just redefine the semantics of that flag. Instead introducea separate GUC_NO_RESET flag. Mark "seed", as well as the transactionproperty GUCs, as GUC_NO_RESET.We have to disallow GUC_ACTION_SAVE as well as straight RESET, becauseotherwise a function having a "SET transaction_isolation" clause canstill break things: the end-of-function restore action is equivalentto a RESET.No back-patch, as it's conceivable that someone is doing somethingthis patch will forbid (like resetting one of these GUCs at transactionstart, or "CREATE FUNCTION ... SET transaction_read_only = 1") and notrunning into problems with it today. Given how long we've had thisissue and not noticed, the side effects in non-assert builds can't betoo serious.Per bug #17385 from Andrew Bille.Masahiko SawadaDiscussion:https://postgr.es/m/17385-9ee529fb091f0ce5@postgresql.org1 parent4148c8b commit3853664
File tree
11 files changed
+103
-13
lines changed- doc/src/sgml
- src
- backend/utils/misc
- include/utils
- pl/plpgsql/src
- expected
- sql
- test/regress
- expected
- sql
11 files changed
+103
-13
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24353 | 24353 |
| |
24354 | 24354 |
| |
24355 | 24355 |
| |
| 24356 | + | |
| 24357 | + | |
| 24358 | + | |
| 24359 | + | |
| 24360 | + | |
| 24361 | + | |
24356 | 24362 |
| |
24357 | 24363 |
| |
24358 | 24364 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3243 | 3243 |
| |
3244 | 3244 |
| |
3245 | 3245 |
| |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
3246 | 3266 |
| |
3247 | 3267 |
| |
3248 | 3268 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
144 |
| - | |
145 |
| - | |
146 |
| - | |
147 | 144 |
| |
148 | 145 |
| |
149 | 146 |
| |
| |||
539 | 536 |
| |
540 | 537 |
| |
541 | 538 |
| |
542 |
| - | |
| 539 | + | |
543 | 540 |
| |
544 | 541 |
| |
545 | 542 |
| |
| |||
554 | 551 |
| |
555 | 552 |
| |
556 | 553 |
| |
| 554 | + | |
| 555 | + | |
557 | 556 |
| |
558 | 557 |
| |
559 | 558 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1505 | 1505 |
| |
1506 | 1506 |
| |
1507 | 1507 |
| |
1508 |
| - | |
| 1508 | + | |
1509 | 1509 |
| |
1510 | 1510 |
| |
1511 | 1511 |
| |
| |||
1524 | 1524 |
| |
1525 | 1525 |
| |
1526 | 1526 |
| |
1527 |
| - | |
| 1527 | + | |
1528 | 1528 |
| |
1529 | 1529 |
| |
1530 | 1530 |
| |
| |||
3606 | 3606 |
| |
3607 | 3607 |
| |
3608 | 3608 |
| |
3609 |
| - | |
| 3609 | + | |
3610 | 3610 |
| |
3611 | 3611 |
| |
3612 | 3612 |
| |
| |||
4557 | 4557 |
| |
4558 | 4558 |
| |
4559 | 4559 |
| |
4560 |
| - | |
| 4560 | + | |
4561 | 4561 |
| |
4562 | 4562 |
| |
4563 | 4563 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
| 210 | + | |
210 | 211 |
| |
211 | 212 |
| |
212 | 213 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
576 | 576 |
| |
577 | 577 |
| |
578 | 578 |
| |
579 |
| - | |
580 |
| - | |
| 579 | + | |
581 | 580 |
| |
582 | 581 |
| |
583 | 582 |
| |
584 | 583 |
| |
585 | 584 |
| |
586 | 585 |
| |
587 | 586 |
| |
588 |
| - | |
| 587 | + | |
589 | 588 |
| |
590 | 589 |
| |
591 | 590 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
484 |
| - | |
485 |
| - | |
| 484 | + | |
486 | 485 |
| |
487 | 486 |
| |
488 | 487 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
839 | 839 |
| |
840 | 840 |
| |
841 | 841 |
| |
| 842 | + | |
842 | 843 |
| |
843 | 844 |
| |
844 | 845 |
| |
| |||
906 | 907 |
| |
907 | 908 |
| |
908 | 909 |
| |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
909 | 918 |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
47 | 81 |
| |
48 | 82 |
| |
49 | 83 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
324 | 324 |
| |
325 | 325 |
| |
326 | 326 |
| |
| 327 | + | |
327 | 328 |
| |
328 | 329 |
| |
329 | 330 |
| |
| |||
360 | 361 |
| |
361 | 362 |
| |
362 | 363 |
| |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
363 | 368 |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
38 | 56 |
| |
39 | 57 |
| |
40 | 58 |
| |
|
0 commit comments
Comments
(0)