From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Kingter Wang <tew@vmware.com>
Cc: PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Subject: Re: pgbench show progress report extremely frequently if "--progress" >= 2148 caused by integer overflow
Date: Fri, 17 Jan 2014 23:04:55 +0100 (CET)
Message-ID: <alpine.DEB.2.10.1401172258010.19515@sto> (raw)
In-Reply-To: <1144780387.13149347.1389941518395.JavaMail.root@vmware.com>
References: <1144780387.13149347.1389941518395.JavaMail.root@vmware.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Hello,
> The integer progress multiple by 1000,000 to convert from second to
> micro-second. If progress >= 2148, then the value of progress * 1000,000
> (2,148,000,000) will larger than max value of 32 bits integer
> (2,147,483,647).
Indeed. Shame on me! I had not thought of overflows because of the false
security of in64 target type. Thanks for the missing cast!
--
Fabien.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: coelho@cri.ensmp.fr, tew@vmware.com
Subject: Re: pgbench show progress report extremely frequently if "--progress" >= 2148 caused by integer overflow
In-Reply-To: <alpine.DEB.2.10.1401172258010.19515@sto>
References: <1144780387.13149347.1389941518395.JavaMail.root@vmware.com> <alpine.DEB.2.10.1401172258010.19515@sto>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox