- Notifications
You must be signed in to change notification settings - Fork28
Commitd56b3af
committed
Restructure error handling in reading of postgresql.conf.
This patch has two distinct purposes: to report multiple problems inpostgresql.conf rather than always bailing out after the first one,and to change the policy for whether changes are applied when there areunrelated errors in postgresql.conf.Formerly the policy was to apply no changes if any errors could bedetected, but that had a significant consistency problem, because in somecases specific values might be seen as valid by some processes but invalidby others. This meant that the latter processes would fail to adoptchanges in other parameters even though the former processes had done so.The new policy is that during SIGHUP, the file is rejected as a wholeif there are any errors in the "name = value" syntax, or if any linesattempt to set nonexistent built-in parameters, or if any lines attemptto set custom parameters whose prefix is not listed in (the new value of)custom_variable_classes. These tests should always give the same resultsin all processes, and provide what seems a reasonably robust defenseagainst loading values from badly corrupted config files. If these testspass, all processes will apply all settings that they individually see asgood, ignoring (but logging) any they don't.In addition, the postmaster does not abandon reading a configuration fileafter the first syntax error, but continues to read the file and reportsyntax errors (up to a maximum of 100 syntax errors per file).The postmaster will still refuse to start up if the configuration filecontains any errors at startup time, but these changes allow multipleerrors to be detected and reported before quitting.Alexey Klyukin, reviewed by Andy Colson and av (Alexander ?)with some additional hacking by Tom Lane1 parent5ec6b7f commitd56b3af
File tree
6 files changed
+281
-197
lines changed- doc/src/sgml
- src
- backend
- access/transam
- commands
- utils/misc
- include/utils
6 files changed
+281
-197
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
104 |
| - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
105 | 107 |
| |
106 | 108 |
| |
107 | 109 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5295 | 5295 |
| |
5296 | 5296 |
| |
5297 | 5297 |
| |
5298 |
| - | |
5299 |
| - | |
| 5298 | + | |
| 5299 | + | |
5300 | 5300 |
| |
5301 |
| - | |
| 5301 | + | |
| 5302 | + | |
| 5303 | + | |
5302 | 5304 |
| |
5303 | 5305 |
| |
5304 | 5306 |
| |
| |||
5504 | 5506 |
| |
5505 | 5507 |
| |
5506 | 5508 |
| |
5507 |
| - | |
5508 | 5509 |
| |
5509 | 5510 |
| |
5510 | 5511 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
472 | 472 |
| |
473 | 473 |
| |
474 | 474 |
| |
475 |
| - | |
| 475 | + | |
| 476 | + | |
476 | 477 |
| |
477 |
| - | |
| 478 | + | |
478 | 479 |
| |
479 | 480 |
| |
480 | 481 |
| |
|
0 commit comments
Comments
(0)