pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Index scan does not return all the data
2+ messages / 2 participants
[nested] [flat]

* Index scan does not return all the data
@ 2019-01-26 15:33  S. Bob <sbob@quadratum-braccas.com>
  0 siblings, 1 reply; 2+ messages in thread

From: S. Bob @ 2019-01-26 15:33 UTC (permalink / raw)
  To: pgsql-admin

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?


Thanks in advance





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

* Re: Index scan does not return all the data
@ 2019-01-26 16:27  Ron <ronljohnsonjr@gmail.com>
  parent: S. Bob <sbob@quadratum-braccas.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Ron @ 2019-01-26 16:27 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

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.




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


end of thread, other threads:[~2019-01-26 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-26 15:33 Index scan does not return all the data S. Bob <sbob@quadratum-braccas.com>
2019-01-26 16:27 ` Ron <ronljohnsonjr@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