Re: Index (primary key) corrupt?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Wim Rouquart <wim(dot)rouquart(at)kbc(dot)be>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Index (primary key) corrupt?
Date: 2026-03-09 15:37:26
Message-ID: 7d455186-0cba-4fd5-9f9e-7051627b3ae3@aklaver.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/9/26 8:24 AM, Greg Sabino Mullane wrote:
> On Mon, Mar 9, 2026 at 10:12 AM Wim Rouquart <wim(dot)rouquart(at)kbc(dot)be
> <mailto:wim(dot)rouquart(at)kbc(dot)be>> wrote:
>
> I already saw finding the actual cause as a 'lost cause' as these
> things tend to happen, however what bothers me most is that a tool
> like amcheck which is supposed to find corruption also shows up with
> no result.
>
>
> Well, no, these things really should not happen. :)
>
> It may be too late, but it would be real interesting to see this query
> both before and after the REINDEX:
>
> select * from pg_index where indrelid  = 'bcf_work_type'::regclass and
> indisprimary;

Déjà vu :)

https://www.postgresql.org/message-id/CAKAnmmK9uKAcerhseNg6FSDOnMWmivM5ctUiTAdc1kobq94Dqw%40mail.gmail.com

This post in answer:

https://www.postgresql.org/message-id/AS2PR05MB107549DDE42DC0B8E31CB52BFEF90A%40AS2PR05MB10754.eurprd05.prod.outlook.com

would seem to indicate that is not the issue.

>
> An incorrect indrelid is one way I can think of as to how pg_dump would
> miss it, but that wouldn't explain why reindex would subsequently fix it.
>
> Cheers,
> Greg
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaheed Haque 2026-03-09 17:21:43 Re: Unexpected deadlock across two separate rows, using Postgres 17 and Django's select_for_update()
Previous Message Greg Sabino Mullane 2026-03-09 15:24:15 Re: Index (primary key) corrupt?