Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4HXJ-0000Dx-Ks for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jan 2014 22:05:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W4HXJ-00043Z-0O for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jan 2014 22:05:09 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4HXH-00043K-U2 for pgsql-bugs@postgresql.org; Fri, 17 Jan 2014 22:05:08 +0000 Received: from smtp-3.ensmp.fr ([194.214.158.102]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4HXA-0000LI-Pa for pgsql-bugs@postgresql.org; Fri, 17 Jan 2014 22:05:07 +0000 Received: from cri.ensmp.fr (139.40.219.88.rev.sfr.net [88.219.40.139]) (authenticated bits=0) by smtp-3.ensmp.fr (8.14.5/8.14.3/JMMC-11/Mar/2010) with ESMTP id s0HM4tbU016468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Jan 2014 23:04:56 +0100 (MET) Date: Fri, 17 Jan 2014 23:04:55 +0100 (CET) From: Fabien COELHO X-X-Sender: fabien@sto To: Kingter Wang cc: PostgreSQL Bugs List Subject: Re: pgbench show progress report extremely frequently if "--progress" >= 2148 caused by integer overflow In-Reply-To: <1144780387.13149347.1389941518395.JavaMail.root@vmware.com> Message-ID: References: <1144780387.13149347.1389941518395.JavaMail.root@vmware.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-ID: X-Miltered: at cascavel with ID 52D9A907.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID coelho X-j-chkmail-Enveloppe: 52D9A907.000 from 139.40.219.88.rev.sfr.net/139.40.219.88.rev.sfr.net/88.219.40.139/cri.ensmp.fr/ X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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