pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #9895: Duplicate pkey
3+ messages / 3 participants
[nested] [flat]

* BUG #9895: Duplicate pkey
@ 2014-04-07 11:57  nk.schjoedt@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: nk.schjoedt@gmail.com @ 2014-04-07 11:57 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      9895
Logged by:          Niels Kristian
Email address:      nk.schjoedt@gmail.com
PostgreSQL version: 9.3.4
Operating system:   Ubuntu
Description:        

Hi I just realized that my data contains a few duplicate primary keys! There
has ALWAYS been a PRIMARY KEY constraint on those ID's. The affected records
might have been created while running a previous version of postgresql. 


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #9895: Duplicate pkey
@ 2014-04-08 00:22  Michael Paquier <michael.paquier@gmail.com>
  parent: nk.schjoedt@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Paquier @ 2014-04-08 00:22 UTC (permalink / raw)
  To: nk.schjoedt@gmail.com; +Cc: pgsql-bugs

On Mon, Apr 7, 2014 at 8:57 PM,  <nk.schjoedt@gmail.com> wrote:
> Hi I just realized that my data contains a few duplicate primary keys! There
> has ALWAYS been a PRIMARY KEY constraint on those ID's. The affected records
> might have been created while running a previous version of postgresql.

9.3.4 has fixed a data corruption issue in WAL replay that could
create inconsistent query results when using an index on a standby.
This could lead to violations of primary keys for example. Perhaps you
have been bitten by that:
http://www.postgresql.org/docs/devel/static/release-9-3-4.html
When updating to 9.3.4 it is recommended to replace all the standbys
by a new base backup after the update.
Regards,
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #9895: Duplicate pkey
@ 2014-04-08 08:02  Niels Kristian Schjødt <nk.schjoedt@gmail.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Niels Kristian Schjødt @ 2014-04-08 08:02 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-bugs

Thanks, that is most defiantly the case.

What is the best approach on doing a loop of re-checking of all my constraints (pkeys, fkeys) -> fixing issues -> checking again, to make sure that my data is OK?

Den 08/04/2014 kl. 02.22 skrev Michael Paquier <michael.paquier@gmail.com>:

> On Mon, Apr 7, 2014 at 8:57 PM,  <nk.schjoedt@gmail.com> wrote:
>> Hi I just realized that my data contains a few duplicate primary keys! There
>> has ALWAYS been a PRIMARY KEY constraint on those ID's. The affected records
>> might have been created while running a previous version of postgresql.
> 
> 9.3.4 has fixed a data corruption issue in WAL replay that could
> create inconsistent query results when using an index on a standby.
> This could lead to violations of primary keys for example. Perhaps you
> have been bitten by that:
> http://www.postgresql.org/docs/devel/static/release-9-3-4.html
> When updating to 9.3.4 it is recommended to replace all the standbys
> by a new base backup after the update.
> Regards,
> -- 
> Michael



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2014-04-08 08:02 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07 11:57 BUG #9895: Duplicate pkey nk.schjoedt@gmail.com
2014-04-08 00:22 ` Michael Paquier <michael.paquier@gmail.com>
2014-04-08 08:02   ` Niels Kristian Schjødt <nk.schjoedt@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox