Re: log_rotation_age integer overflow display quirk

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: log_rotation_age integer overflow display quirk
Date: 2008-07-04 13:18:23
Message-ID: 139D8A05100D6654779A0F14@imhotep.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Freitag, Juli 04, 2008 11:31:07 +0200 Stefan Kaltenbrunner
<stefan(at)kaltenbrunner(dot)cc> wrote:

> I just noticed that setting log_rotation_age to a value larger than 24
> days results in rather weird output (I have not actually tested yet if
> that affects the functionality too or just the output):
>
>
> test=# show log_rotation_age;
> log_rotation_age
> ------------------
> -2134967296ms
> (1 row)

This seems to be a bug in _ShowOption(), where the corresponding value is
converted into milliseconds to get the biggest possible time unit to
display. This overflows the result variable (which is declared as int),
causing this strange output.

--
Thanks

Bernd

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2008-07-04 14:38:06 Review: DTrace probes (merged version)
Previous Message Heikki Linnakangas 2008-07-04 12:53:04 Re: pgsql: Fix a couple of bugs in win32 shmem name generation: * Don't cut