Re: Missing PRIMARY KEYs and duplicated rows

From: Chris Pacejo <cpacejo(at)clearskydata(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Missing PRIMARY KEYs and duplicated rows
Date: 2017-04-12 21:08:39
Message-ID: CAC8iE5ihe0C7XJ1bzdNTfjFeKsfHjUoUyoCA8BX1=Pcjm_1vSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Apr 12, 2017 at 4:55 PM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Wed, Apr 12, 2017 at 1:46 PM, Chris Pacejo <cpacejo(at)clearskydata(dot)com> wrote:
>> All indexes are b-tree indexes.
>
> Can you show us the definition of all affected indexes? Any
> discernible pattern to them?

They are bog-standard b-trees created on behalf of a primary key,
almost always an integer or bigint. E.g., from one of the unaffected
databases:

Indexes:
"pk_databasechangeloglock" PRIMARY KEY, btree (id)

The primary keys disappear from pg_class as well.

The only pattern is that they're all in the same database. Which
seems very strange to me; I'm having trouble thinking of what part of
Postgres would affect both schema AND data in all tables of ONE
database. If I remember correctly each table is stored in a separate
file, and the WAL and server processes are shared across all
databases.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Kirkwood 2017-04-12 22:13:30 Re: Missing PRIMARY KEYs and duplicated rows
Previous Message Peter Geoghegan 2017-04-12 20:55:59 Re: Missing PRIMARY KEYs and duplicated rows