forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit040f28b
committed
Fix pg_ctl's readfile() to not go into infinite loop on an empty file
(could happen if either postgresql.conf or postmaster.opts is empty).It's been broken since the C version was written for 8.0, so patchall the way back.initdb's copy of the function is broken in the same way, but it'sless important there since the input files should never be empty.Patch that in HEAD only, and also fix some cosmetic differences thatcrept into that copy of the function.Per report from Corry Haines and Jeff Davis.1 parent794e3e8 commit040f28b
2 files changed
+9
-15
lines changedLines changed: 7 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 |
| - | |
| 152 | + | |
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
| |||
362 | 362 |
| |
363 | 363 |
| |
364 | 364 |
| |
365 |
| - | |
| 365 | + | |
366 | 366 |
| |
367 | 367 |
| |
368 |
| - | |
| 368 | + | |
369 | 369 |
| |
370 | 370 |
| |
371 | 371 |
| |
| |||
394 | 394 |
| |
395 | 395 |
| |
396 | 396 |
| |
397 |
| - | |
398 | 397 |
| |
399 | 398 |
| |
400 | 399 |
| |
401 | 400 |
| |
402 | 401 |
| |
403 | 402 |
| |
404 |
| - | |
405 |
| - | |
406 |
| - | |
| 403 | + | |
| 404 | + | |
407 | 405 |
| |
408 | 406 |
| |
409 |
| - | |
410 | 407 |
| |
411 | 408 |
| |
412 | 409 |
| |
413 |
| - | |
414 |
| - | |
415 |
| - | |
416 |
| - | |
| 410 | + | |
417 | 411 |
| |
418 | 412 |
| |
419 | 413 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
292 | 292 |
| |
293 | 293 |
| |
294 | 294 |
| |
295 |
| - | |
| 295 | + | |
296 | 296 |
| |
297 | 297 |
| |
298 | 298 |
| |
|
0 commit comments
Comments
(0)