pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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 13:01:48 -0400
Message-ID: <1488151.1631984508@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAEpUZn=G6+tJ46QGYegdNyKuOsSYVAbsXGGR4_Fj7EJDxvicQ@mail.gmail.com>
References: <CAAEpUZn=G6+tJ46QGYegdNyKuOsSYVAbsXGGR4_Fj7EJDxvicQ@mail.gmail.com>

Tobias Meyer <t9m@qad.com> writes:
> Now I see
> select oid,* from pg_largeobject_metadata where oid=665238;
>   oid   | lomowner | lomacl
> --------+----------+--------
>  665238 |    16123 |
>  665238 |    16123 |
> (2 rows)

hmm ... is this a reasonably up-to-date v10?

> Deleting both would be a no-go, as I cannot INSERT a specific oid to add
> one back as far as I know.
> So how do I delete only one of the two?

Delete by ctid.

select ctid, oid, * from pg_largeobject_metadata where oid=665238;
delete from pg_largeobject_metadata where ctid = 'pick one';

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <1488151.1631984508@sss.pgh.pa.us>
Permalink:  ../1488151.1631984508@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1488151.1631984508@sss.pgh.pa.us

 · 

reply

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: <1488151.1631984508@sss.pgh.pa.us>
  References: <CAAEpUZn=G6+tJ46QGYegdNyKuOsSYVAbsXGGR4_Fj7EJDxvicQ@mail.gmail.com> <1488151.1631984508@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