Re: Two entries with the same primary key

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Ivan Evtuhovich <evtuhovich(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Two entries with the same primary key
Date: 2012-04-12 20:48:30
Message-ID: CAHyXU0ywRvzL7kWDzOiruv8G5eqo2xG_X28jAH4Y9xwpbKWPNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 12, 2012 at 9:20 AM, Ivan Evtuhovich <evtuhovich(at)gmail(dot)com> wrote:
> Hello,
>
> More then month ago we upgrade DB from 9.0 to 9.1 with pg_upgrade. Then we
> move DB to another server with standard pg streaming replication.
>
> Now we have two entries with the same primary key. And I do not know what to
> do.
>
> SELECT ctid, id from billing_invoices where id = 27362891;
>
> ctid | id
> --------------+----------
> (1112690,11) | 27362891
> (1112438,26) | 27362891
>

Per some off-list conversation with Ivan, this is only happening on
the standby. Ivan, what's the precise version of postgres you are
using? When you first went to hs/sr? I bet your clog files are out
of whack (and if so, probably upgrading to recent bugfix postgres and
standby resync is the correct course of action).

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bret Stern 2012-04-12 21:04:49 Installer Questions (NSIS)
Previous Message Francois 2012-04-12 20:39:48 Re: Hot Standby - ERROR: canceling statement due to conflict with recovery