Re: Remove duplicated row in pg_largeobject_metadata - Mailing list pgsql-general

From Tobias Meyer
Subject Re: Remove duplicated row in pg_largeobject_metadata
Date
Msg-id CAAEpUZm7tExX6Q88SN=KQ2R9P0QE3SOVd2=2WHy3DXHe9Hpgzw@mail.gmail.com
Whole thread Raw
In response to Re: Remove duplicated row in pg_largeobject_metadata  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Remove duplicated row in pg_largeobject_metadata
List pgsql-general
Yipes.  Did you verify that the TIDs are all distinct?
yes, they were.
 
A possible theory is that pg_largeobject_metadata_oid_index has been
corrupt for a long time, allowing a lot of duplicate entries to be made.
However, unless pg_largeobject's pg_largeobject_loid_pn_index is *also*
corrupt, you'd think that creation of such duplicates would still be
stopped by that unique index.  There's something mighty odd here.

That would be a mildly disturbing thought indeed. 
Any way to quickly check that without reindexing?

But if those duplicates were inserted during normal operation, that would mean there had been an OID overflow, correct?
And that would also mean we would have to be referencing the same OID in more than one place (different LOs actually), which I could not see in the other tables. Did not check that for all 2.9 million though.

Let me roll back the test instance to before the first vacuumlo run and verify if the index was OK before - will only get to do that on monday though. 

Kind regards, 
Tobias


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Remove duplicated row in pg_largeobject_metadata
Next
From: Niels Jespersen
Date:
Subject: Possibilities for optimizing inserts across oracle_fdw foreign data wrapper