From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix syslogger to not fail when log_rotation_age exceeds 2^31 mil |
Date: | 2012-11-18 21:17:00 |
Message-ID: | E1TaCEe-0003u3-J4@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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 if
the 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 in
guc.c --- it was numerically right, but only because MINS_PER_HOUR and
SECS_PER_MINUTE have the same value.
Back-patch to 9.2. Before that, syslogger wasn't using WaitLatch.
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/89067bc16a1d1ea5bf131b3529e01d208f2e34c0
Modified Files
--------------
src/backend/postmaster/syslogger.c | 17 +++++++++++++++--
src/backend/utils/misc/guc.c | 2 +-
2 files changed, 16 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-11-18 22:16:03 | pgsql: Limit values of archive_timeout, post_auth_delay, auth_delay.mil |
Previous Message | Tom Lane | 2012-11-18 20:40:02 | pgsql: Assert that WaitLatch's timeout is not more than INT_MAX millise |