From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tobias Meyer <t9m@qad.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Remove duplicated row in pg_largeobject_metadata
Date: Sat, 18 Sep 2021 14:28:11 -0400
Message-ID: <1492489.1631989691@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAEpUZm5Q0FJBPHthjmyzuV4jDHoM251y+-6ViLX1OR1Pt8vGQ@mail.gmail.com>
References: <CAAEpUZn=G6+tJ46QGYegdNyKuOsSYVAbsXGGR4_Fj7EJDxvicQ@mail.gmail.com>
<1488151.1631984508@sss.pgh.pa.us>
<CAAEpUZm5Q0FJBPHthjmyzuV4jDHoM251y+-6ViLX1OR1Pt8vGQ@mail.gmail.com>
Tobias Meyer <t9m@qad.com> writes:
> so I did
> select ctid as tid,oid,lomowner into temp table temp_pgmeta from
> pg_largeobject_metadata;
> select * from ( select count(tid) as cnt,max(tid), min(tid), oid from
> temp_pgmeta group by oid) x where cnt > 1;
> and that gave me 2951857 rows
Yipes. Did you verify that the TIDs are all distinct?
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.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, t9m@qad.com
Subject: Re: Remove duplicated row in pg_largeobject_metadata
In-Reply-To: <1492489.1631989691@sss.pgh.pa.us>
References: <CAAEpUZn=G6+tJ46QGYegdNyKuOsSYVAbsXGGR4_Fj7EJDxvicQ@mail.gmail.com> <1488151.1631984508@sss.pgh.pa.us> <CAAEpUZm5Q0FJBPHthjmyzuV4jDHoM251y+-6ViLX1OR1Pt8vGQ@mail.gmail.com> <1492489.1631989691@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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