pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15023: problem with pg_statistic
3+ messages / 3 participants
[nested] [flat]
* BUG #15023: problem with pg_statistic
@ 2018-01-21 02:59 PG Bug reporting form <noreply@postgresql.org>
2018-01-21 17:10 ` Re: BUG #15023: problem with pg_statistic Tomas Vondra <tomas.vondra@2ndquadrant.com>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2018-01-21 02:59 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: ktr@goldin-rudahl.com
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)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #15023: problem with pg_statistic
2018-01-21 02:59 BUG #15023: problem with pg_statistic PG Bug reporting form <noreply@postgresql.org>
@ 2018-01-21 17:10 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
2018-01-22 01:01 ` Re: BUG #15023: problem with pg_statistic Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tomas Vondra @ 2018-01-21 17:10 UTC (permalink / raw)
To: ktr@goldin-rudahl.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #15023: problem with pg_statistic
2018-01-21 02:59 BUG #15023: problem with pg_statistic PG Bug reporting form <noreply@postgresql.org>
2018-01-21 17:10 ` Re: BUG #15023: problem with pg_statistic Tomas Vondra <tomas.vondra@2ndquadrant.com>
@ 2018-01-22 01:01 ` Michael Paquier <michael.paquier@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Paquier @ 2018-01-22 01:01 UTC (permalink / raw)
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>; +Cc: ktr@goldin-rudahl.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
On Sun, Jan 21, 2018 at 06:10:15PM +0100, Tomas Vondra wrote:
> 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).
Duplicated rows could be caused by the freeze-the-dead bug as well,
which is not released yet (doesn't fix duplicated existing rows
anyway). It may be possible to get rid of this problem by removing
manually duplicated rows by tid matching.
> If that's the case, I'd suspect there are other corrupted tables.
That's likely possible, and impossible to say with this amount of
information. In this case, what you should do first is stop your server,
take a deep breath, and then read the following guidelines:
https://wiki.postgresql.org/wiki/Corruption
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-01-22 01:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-21 02:59 BUG #15023: problem with pg_statistic PG Bug reporting form <noreply@postgresql.org>
2018-01-21 17:10 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
2018-01-22 01:01 ` Michael Paquier <michael.paquier@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