forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit195e81a
committed
Find postgresql.auto.conf in PGDATA even when postgresql.conf is elsewhere.
The original coding for ALTER SYSTEM made a fundamentally bogus assumptionthat postgresql.auto.conf could be sought relative to the main config fileif we hadn't yet determined the value of data_directory. This fails forcommon arrangements with the config file elsewhere, as reported byChristoph Berg.The simplest fix is to not try to read postgresql.auto.conf until afterSelectConfigFiles has chosen (and locked down) the data_directory setting.Because of the logic in ProcessConfigFile for handling resetting of GUCsthat've been removed from the config file, we cannot easily read the mainand auto config files separately; so this patch adopts a brute forceapproach of reading the main config file twice during postmaster startup.That's a tad ugly, but the actual time cost is likely to be negligible,and there's no time for a more invasive redesign before beta.With this patch, any attempt to set data_directory via ALTER SYSTEMwill be silently ignored. It would probably be better to throw anerror, but that can be dealt with later. This bug, however, wouldprevent any testing of ALTER SYSTEM by a significant fraction of theuserbase, so it seems important to get it fixed before beta.1 parent12e611d commit195e81a
2 files changed
+20
-20
lines changedLines changed: 12 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 |
| - | |
124 |
| - | |
| 123 | + | |
125 | 124 |
| |
126 | 125 |
| |
127 | 126 |
| |
| |||
136 | 135 |
| |
137 | 136 |
| |
138 | 137 |
| |
139 |
| - | |
140 |
| - | |
141 |
| - | |
| 138 | + | |
142 | 139 |
| |
143 | 140 |
| |
144 | 141 |
| |
| |||
149 | 146 |
| |
150 | 147 |
| |
151 | 148 |
| |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
156 | 153 |
| |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
163 | 157 |
| |
164 | 158 |
| |
165 | 159 |
| |
| |||
397 | 391 |
| |
398 | 392 |
| |
399 | 393 |
| |
400 |
| - | |
| 394 | + | |
401 | 395 |
| |
402 | 396 |
| |
403 | 397 |
| |
| |||
417 | 411 |
| |
418 | 412 |
| |
419 | 413 |
| |
420 |
| - | |
421 |
| - | |
422 |
| - | |
423 |
| - | |
| 414 | + | |
| 415 | + | |
424 | 416 |
| |
425 | 417 |
| |
426 | 418 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4363 | 4363 |
| |
4364 | 4364 |
| |
4365 | 4365 |
| |
| 4366 | + | |
| 4367 | + | |
| 4368 | + | |
| 4369 | + | |
| 4370 | + | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
4366 | 4374 |
| |
4367 | 4375 |
| |
4368 | 4376 |
| |
|
0 commit comments
Comments
(0)