Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2BD461337B64 for ; Tue, 23 Nov 2010 10:48:23 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 82928-10 for ; Tue, 23 Nov 2010 14:48:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id EBB1B1337B5C for ; Tue, 23 Nov 2010 10:48:14 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 23 Nov 2010 08:48:14 -0600 Message-Id: <4CEB7FCA0200002500037D77@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 23 Nov 2010 08:48:10 -0600 From: "Kevin Grittner" To: "pgsql-admin@postgresql.org" , "Khangelani Gama" Subject: Re: Postgres database : Out of balance problem from the same table References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/200 X-Sequence-Number: 36166 Khangelani Gama wrote: > dbmaster =# select to_char(sum(aud_id),9999999999999.99) from > audmth where aud_id <1669629; > to_char > ------------------- > 2774814647.00 > (1 row) > dbbackup =# select to_char(sum(aud_id),9999999999999.99) from > audmth where aud_id <1669629; > to_char > ------------------- > 2773145126.00 > (1 row) How are you getting the data from the master to the backup? What does the definition of the audmth table look like (including indexes)? How many rows are in it? Have you gotten any unusual messages in the log? > Due to the above issue, we restored the database from dbbackup to > masterdb and visa versa, but we are still getting difference from > the two databases which is very strange. How did you restore from one to the other, exactly? Where on each machine are you deploying the data? Which port is being used in each case? How are you starting and stopping the databases? When you say you still get the difference, do you mean the total is staying with the machine or following the copy of the database? What version of PostgreSQL is this? How did you install it? Since identical databases running identical software don't return different results for the same query, there is some important fact you haven't told us yet. Maybe one of the questions I've asked will draw that out, but it would be best if you took some time to think about what else might be different that you haven't told us yet. -Kevin