Re: BUG #15023: problem with pg_statistic

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: BUG #15023: problem with pg_statistic
Дата
Msg-id 95b5276d-2461-3312-bce0-670b0d29e3b0@2ndquadrant.com
обсуждение исходный текст
Ответ на BUG #15023: problem with pg_statistic  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15023: problem with pg_statistic  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs

On 01/21/2018 03:59 AM, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      15023
> Logged by:          kurt rudahl
> Email address:      ktr@goldin-rudahl.com
> PostgreSQL version: Unsupported/Unknown
> Operating system:   linux
> Description:        
> 
> Problem: cannot reindex pg_statistic
>          therefore cannot vacuum
> 
> Steps to recreate:
> 1. restart postgresql
> 2. psql thaistocks
> 
> \set VERBOSITY verbose
> thaistocks=# reindex table pg_statistic;
> ERROR:  23505: could not create unique index
> DETAIL:  Table contains duplicated values.
> LOCATION:  comparetup_index, tuplesort.c:2163
> 
> thaistocks=# select starelid,staattnum from pg_statistic group by
> starelid,staattnum having count(*) > 1;
>  starelid | staattnum 
> ----------+-----------
>     10723 |         5
>     10728 |         1
>      1260 |         9
> (3 rows)
> 

It's really difficult (read: impossible) to help you unless you tell us
more - for example what PostgreSQL version you're running, how did you
get into this situation (e.g. any crashes recently?).

In any case, this seems like a case of data corruption, possibly due to
a bug (not sure which PostgreSQL version you're using) hardware failure
or misconfiguration (e.g. system not handling fsync correctly).

If that's the case, I'd suspect there are other corrupted tables.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15024: I am a beginer and in learning face
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15024: I am a beginer and in learning face