X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 28EEAD1B464 for ; Sun, 7 Dec 2003 21:16:43 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 00464-03 for ; Sun, 7 Dec 2003 17:16:13 -0400 (AST) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 8395FD1B4A1 for ; Sun, 7 Dec 2003 17:16:10 -0400 (AST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id hB7LGBG27161; Sun, 7 Dec 2003 16:16:11 -0500 (EST) From: Bruce Momjian Message-Id: <200312072116.hB7LGBG27161@candle.pha.pa.us> Subject: Re: autovacuum daemon stops doing work after about an In-Reply-To: <16335.43272.273411.653445@yertle.int.kciLink.com> To: Vivek Khera Date: Sun, 7 Dec 2003 16:16:11 -0500 (EST) Cc: pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/148 X-Sequence-Number: 5008 This has been fixed and will be in 7.4.1. --------------------------------------------------------------------------- Vivek Khera wrote: > >>>>> "LR" == Larry Rosenman writes: > > >> I'd be curious to see the output of this program on other platforms > >> and other compilers. I'm using gcc 2.95.4 as shipped with FreeBSD > >> 4.8+. > LR> this is with the UnixWare compiler: > LR> $ cc -O -o testvk testvk.c > LR> $ ./testvk > LR> seconds = 3509 > LR> seconds1 = 3509000000 > LR> useconds = -452486 > LR> stepped diff = 3508547514 > LR> seconds2 = -785967296 > LR> seconds3 = 3509000000 > LR> diff = -786419782 > LR> long long diff = 3508547514 > LR> $ > > LR> I think this is a C bug. > > Upon further reflection, I think so to. The entire RHS is long's so > the arithmetic is done in longs, then assigned to a long long when > done (after things have overflowed). Forcing any one of the RHS > values to be long long causes the arithmetic to all be done using long > longs, and then you get the numbers you expect. > > I think you only notice this in autovacuum when it takes a long time > to complete the work, like my example of about 3500 seconds. > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073