pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Index scan does not return all the data
Date: Sat, 26 Jan 2019 10:27:20 -0600
Message-ID: <8be4b59a-482f-0eff-b271-223cd8dba19a@gmail.com> (raw)
In-Reply-To: <4b961a85-94cf-39c5-2432-fc3abd0be695@quadratum-braccas.com>
References: <4b961a85-94cf-39c5-2432-fc3abd0be695@quadratum-braccas.com>

On 1/26/19 9:33 AM, S. Bob wrote:
> Hi all;
>
>
> we have a client that has run into an issue, they have a PK on an id 
> column and another unique index on the id and a timestamp. when we run a 
> select it selects one of several indexes, in some cases a non unique index 
> on a secondary ID, however when we do a pg_dump, or a CREATE TABLE x AS 
> select * from this table then we get many many duplicates that violate the 
> PK and the unique index.
>
> Thoughts?

Sounds like a corrupt index.  "REINDEX TABLE foo" and -- if not already -- 
update to the latest release of your version.



-- 
Angular momentum makes the world go 'round.




view thread (2+ messages)

Message-ID: <8be4b59a-482f-0eff-b271-223cd8dba19a@gmail.com>
Permalink:  ../8be4b59a-482f-0eff-b271-223cd8dba19a@gmail.com/
Also on:    postgresql.org/message-id/8be4b59a-482f-0eff-b271-223cd8dba19a@gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Index scan does not return all the data
  In-Reply-To: <8be4b59a-482f-0eff-b271-223cd8dba19a@gmail.com>

* 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