Re: vacuumlo fails pgsql ver 8.3

From: Pat Heuvel <pheuvel(at)tpg(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: vacuumlo fails pgsql ver 8.3
Date: 2012-02-08 09:48:39
Message-ID: 4F3244F7.7090200@tpg.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/02/2012 3:48 AM, Tom Lane wrote:
> Pat Heuvel<pheuvel(at)tpg(dot)com(dot)au> writes:
>> On 6/02/2012 4:39 AM, Tom Lane wrote:
>>> What exactly happens when you try to reindex pg_largeobject?
>> ERROR: could not create unique index "pg_largeobject_loid_pn_index"
>> DETAIL: Table contains duplicated values.
> Could be worse. What you'll need to do is look through the
> pg_largeobject catalog for duplicated (loid, pageno) values, and
> manually DELETE the redundant rows, or else reassign them new OIDs
> if you want to keep the data.
>
> A tip for issuing the removal commands is to use the CTID column to
> distinguish otherwise-identical rows, ie you could do something
> like
> select ctid, loid, pageno from pg_largeobject
> where (loid, pageno) in (select loid, pageno from pg_largeobject
> group by 1, 2 having count(*)> 1);
> ... examine results ...
> delete from pg_largeobject where ctid = '...';
>
> I believe you'll need to do any direct DELETE or UPDATE on the
> catalog as superuser.
>
> regards, tom lane
>
>
Thanks Tom, I'll give that a try.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message 84.le0n 2012-02-08 13:37:44 Re: SOUNDEX call
Previous Message Dave Potts 2012-02-08 06:30:01 [FIXED] Re: problems connecting to php via pg_connect and PGCLUSTER