pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: Chris Pacejo <cpacejo@clearskydata.com>
To: pgsql-bugs@postgresql.org
Subject: Re: Missing PRIMARY KEYs and duplicated rows
Date: Thu, 13 Apr 2017 10:13:30 +1200
Message-ID: <7c077ec8-7dcb-9e92-09f3-8890ecd2bc9e@catalyst.net.nz> (raw)
In-Reply-To: <CAC8iE5ieb5tnFUnkO9L81sNQbg3F5MAUnv5b8GNoN+Se61ZA2g@mail.gmail.com>
References: <CAC8iE5ieb5tnFUnkO9L81sNQbg3F5MAUnv5b8GNoN+Se61ZA2g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 13/04/17 08:46, Chris Pacejo wrote:

> Hi all, we're encountering a very strange issue lately on a 9.4.5 server.
>
> We recently performed a dump & restore of the entire cluster to
> migrate to a new server.  All but one of the databases seem fine.
> That one is encountering a very strange issue.
>
> It seems that periodically, the primary keys (and underlying indexes)
> of all tables in the database disappear, and every row in each table
> gets duplicated.  This appears to occur at the storage level, as the
> duplicated rows get their own ctids (so it's not just a query
> artifact).  I've seen this happen twice in the past week.
>
> I can delete the duplicate rows (by their ctid).  In the first
> instance, I was unable to re-add the primary key, as it had reappeared
> by the time I issued the statement.  In the most recent instance, I
> did re-add the primary key to a table, and the other primary keys have
> not yet re-appeared.
>
> All indexes are b-tree indexes.  They were not created using
> CONCURRENTLY.  They are in the default tablespace.  The installation
> is on an Intel CentOS machine using the PGDG RPMs.  I've checked the
> release notes for all 9.4 bugfixes and do not see anything which could
> relate to this issue.
>
> Any insight into this issue?  We will probably just drop and recreate
> the database from the recent dump, as it is on a production server and
> we'd rather not take chances tinkering around with it.  But it would
> be nice to know why/how we've encountered this to ensure it won't
> happen again, because frankly it's quite a scary issue.
>
>

I'd be inclined to suspect the hardware with weird behaviour like that 
(memory and disk errors in particular).

Cheers

Mark



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



view thread (7+ messages)  latest in thread

Message-ID: <7c077ec8-7dcb-9e92-09f3-8890ecd2bc9e@catalyst.net.nz>
Permalink:  ../7c077ec8-7dcb-9e92-09f3-8890ecd2bc9e@catalyst.net.nz/
Also on:    postgresql.org/message-id/7c077ec8-7dcb-9e92-09f3-8890ecd2bc9e@catalyst.net.nz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: mark.kirkwood@catalyst.net.nz, cpacejo@clearskydata.com
  Subject: Re: Missing PRIMARY KEYs and duplicated rows
  In-Reply-To: <7c077ec8-7dcb-9e92-09f3-8890ecd2bc9e@catalyst.net.nz>
  References: <CAC8iE5ieb5tnFUnkO9L81sNQbg3F5MAUnv5b8GNoN+Se61ZA2g@mail.gmail.com> <7c077ec8-7dcb-9e92-09f3-8890ecd2bc9e@catalyst.net.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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