Re: Postgres database : Out of balance problem from the same table

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "Khangelani Gama" <Khangelani(dot)Gama(at)ucs-software(dot)co(dot)za>
Subject: Re: Postgres database : Out of balance problem from the same table
Date: 2010-11-23 14:48:10
Message-ID: 4CEB7FCA0200002500037D77@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Khangelani Gama <Khangelani(dot)Gama(at)ucs-software(dot)co(dot)za> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2010-11-23 15:22:29 Re: FK disappeared in 8.3.3
Previous Message tomislavb 2010-11-23 12:24:25 managing access to database