forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit059de3c
committed
Fix failure to verify PGC_[SU_]BACKEND GUCs in pg_file_settings view.
set_config_option() bails out early if it detects that the option tobe set is PGC_BACKEND or PGC_SU_BACKEND class and we're reading theconfig file in a postmaster child; we don't want to apply any newvalue in such a case. That's fine as far as it goes, but it failsto consider the requirements of the pg_file_settings view: for that,we need to check validity of the value even though we have nointention to apply it. Because we didn't, even very silly valuesfor affected GUCs would be reported as valid by the view. Thereare only half a dozen such GUCs, which perhaps explains why thisgot overlooked for so long.Fix by continuing when changeVal is false; this parallels the logicin some other early-exit paths.Also, the check added by commit924bcf4 to prevent GUC changes inparallel workers seems a few bricks shy of a load: it's evidentlyassuming that ereport(elevel, ...) won't return. Make sure webail out if it does. The lack of trouble reports suggests thatthis is only a latent bug, i.e. parallel workers don't actuallyreach here with elevel < ERROR. (Per the code coverage report,we never reach here at all in the regression suite.) But we clearlydon't want to risk proceeding if that does happen.Per report from Rıdvan Korkmaz. These are ancient bugs, so back-patchto all supported branches.Discussion:https://postgr.es/m/2089235.1703617353@sss.pgh.pa.us1 parenta46972e commit059de3c
1 file changed
+8
-1
lines changedLines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3412 | 3412 |
| |
3413 | 3413 |
| |
3414 | 3414 |
| |
| 3415 | + | |
3415 | 3416 |
| |
3416 | 3417 |
| |
3417 | 3418 |
| |
| 3419 | + | |
| 3420 | + | |
3418 | 3421 |
| |
3419 | 3422 |
| |
3420 | 3423 |
| |
| |||
3515 | 3518 |
| |
3516 | 3519 |
| |
3517 | 3520 |
| |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
3518 | 3525 |
| |
3519 | 3526 |
| |
3520 | 3527 |
| |
| |||
3525 | 3532 |
| |
3526 | 3533 |
| |
3527 | 3534 |
| |
3528 |
| - | |
| 3535 | + | |
3529 | 3536 |
| |
3530 | 3537 |
| |
3531 | 3538 |
| |
|
0 commit comments
Comments
(0)