pg_statistic corruption and duplicated primary keys

Поиск
Список
Период
Сортировка
От Silvela, Jaime \(Exchange\)
Тема pg_statistic corruption and duplicated primary keys
Дата
Msg-id B0D2EF413B7344489985137E6DDB6C430BF71B@whexchmb14.bsna.bsroot.bear.com
обсуждение исходный текст
Ответы Re: pg_statistic corruption and duplicated primary keys  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general

Lately my database crashed and I’ve had some strangeness following.

I found that some tables would have two distinct rows with identical primary key.

 

Now, VACUUM complains thusly

 

WARNING:  index "pg_statistic_relid_att_index" contains 2984 row versions, but table contains 2983 row versions

HINT:  Rebuild the index with REINDEX.

 

After trying to reindex, I get

 

ERROR:  could not create unique index

DETAIL:  Table contains duplicated values.

 

I think I’m seeing the same issue – a duplicated row.

 

I know this should not happen – but does it in fact come to happen sometimes?

Is there a smarter way of dealing with it than deleting the duplicate?

How can these duplicates get produced?

 

And, for pg_statistic in particular, is it safe to muck with it?  What should I do?

 

Thanks

Jaime

В списке pgsql-general по дате отправления:

Предыдущее
От: "Brandon Aiken"
Дата:
Сообщение: Re: Precision of data types and functions
Следующее
От: Robert Treat
Дата:
Сообщение: Re: [pgsql-advocacy] Thought provoking piece on NetBSD