forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit89067bc
committed
Fix syslogger to not fail when log_rotation_age exceeds 2^31 milliseconds.
We need to avoid calling WaitLatch with timeouts exceeding INT_MAX.Fortunately a simple clamp will do the trick, since no harm is done ifthe wait times out before it's really time to rotate the log file.Per bug #7670 (probably bug #7545 is the same thing, too).In passing, fix bogus definition of log_rotation_age's maximum value inguc.c --- it was numerically right, but only because MINS_PER_HOUR andSECS_PER_MINUTE have the same value.Back-patch to 9.2. Before that, syslogger wasn't using WaitLatch.1 parentf0461cd commit89067bc
2 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
418 | 424 | | |
419 | 425 | | |
420 | 426 | | |
421 | | - | |
422 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
423 | 436 | | |
424 | 437 | | |
425 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2134 | 2134 | | |
2135 | 2135 | | |
2136 | 2136 | | |
2137 | | - | |
| 2137 | + | |
2138 | 2138 | | |
2139 | 2139 | | |
2140 | 2140 | | |
| |||
0 commit comments
Comments
(0)