Re: Index (primary key) corrupt?

Adrian Klaver <adrian.klaver@aklaver.com>

From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Wim Rouquart <wim.rouquart@kbc.be>, Greg Sabino Mullane <htamfids@gmail.com>
Cc: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2026-02-13T17:32:47Z
Lists: pgsql-general

On 2/13/26 8:27 AM, Wim Rouquart wrote:
> Internal
> 
> 1) ) It won't be included with the CREATE TABLE statement per:-
> 
> Yes, let's keep it at: it's not in the dumpfile anywhere.
> 
>> 2) The issue seems to be not the dump, but the non-functional state of the index on the source database.
> 
>> Is there any indication of why that is happening?
> 
> Not as far as I know.

So the REINDEX on the source PK is prompted by it not showing up on the 
target?

> 
>> Also what error do you get on the source database that tells you the PK is not working?
> 
> None, only noticed the issue because of the datarefresh to another instance where it turned out the primary key was not created in the target (because it was not in the dumpfile).

On the test instance you set up with pg_basebackup and that has the 
corrupted index what happens if you try to INSERT a record with a 
duplicate id?

> 

>> I hope this clears out any confusion.
>>
>> -----Original Message-----
> Adrian Klaver
> adrian.klaver@aklaver.com
> 
> Disclaimer <https://www.kbc.com/KBCmailDisclaimer>