Re: Mismatched pg_class.reltuples between table and primary key

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: Mismatched pg_class.reltuples between table and primary key
Дата
Msg-id CAGrpgQ_f6E=Q0vsXvidVZqw3M_G-Um_tmCSYZOLTy0-onR3SgQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Mismatched pg_class.reltuples between table and primary key  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-general
Hi Alvaro,

Thanks for the link.

On Mon, Dec 2, 2013 at 4:35 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
bricklen escribió:
> We recently experienced a hard crash of a dev server due to lack of
> resources (we think, still investigating).
> That resulted in an interesting scenario where one of the tables was
> returning 12 rows from "select * from tbl", but "select * from tbl order by
> <pk column>" was only returning 11.
> Looking at pg_class.reltuples, it could be clearly seen that the table in
> question had a value of 12, but the primary key had only 11.

This sounds very similar to what was reported in
http://www.postgresql.org/message-id/20131126123244.GI23284@alap2.anarazel.de

In short, you probably want to make sure to upgrade to this week's
release.

If it is indeed the same issue (and I see something similar in an actual production system running 9.2.5 which was recovered from a crashed LVM just the other day), are the chances of data corruption particularly high? From reading over that linked thread, it looked like the problem was likely to stem from wraparound.

Once the patch is applied, will the existing data still be vulnerable? I haven't been paying close attention to that particular thread, so I might have missed a few things regarding the fixes -- will a full dump + reload be necessary?

Thanks,

Bricklen

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Mismatched pg_class.reltuples between table and primary key
Следующее
От: David Johnston
Дата:
Сообщение: Re: Inserting boolean types as an alias?