Re: Vacuum problem due to temp tables

From: Bhakti Ghatkar <bghatkar(at)zedo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Vacuum problem due to temp tables
Date: 2011-02-28 05:08:36
Message-ID: AANLkTikONUnz_c3mKXeobh7i3OU-bJjZk+xf1xdwbH4p@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom,

The query which you gave returns me 0 rows.

select ctid,xmin,xmax,* from pg_index where indexrelid in
(select indexrelid from pg_index group by 1 having count(*)>1);

Regards,
Bhakti

On Sat, Feb 26, 2011 at 10:55 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Bhakti Ghatkar <bghatkar(at)zedo(dot)com> writes:
> > We were running full vacuum on DB when we encountered the error below;
>
> > INFO: vacuuming "pg_catalog.pg_index"
> > *vacuumdb: vacuuming of database "rpt_production" failed: ERROR:
> duplicate
> > key value violates unique constraint "pg_index_indexrelid_index"*
> > DETAIL: Key (indexrelid)=(2678) already exists.
>
> That's pretty bizarre, but what makes you think it has anything to do
> with temp tables? OID 2678 is pg_index_indexrelid_index itself.
> It looks to me like you must have duplicate rows in pg_index for that
> index (and maybe others?), and the problem is exposed during vacuum full
> because it tries to rebuild the indexes.
>
> Could we see the output of
>
> select ctid,xmin,xmax,* from pg_index where indexrelid in
> (select indexrelid from pg_index group by 1 having count(*)>1);
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Selva manickaraja 2011-02-28 05:09:49 Re: Performance Test for PostgreSQL9
Previous Message Mark Kirkwood 2011-02-28 04:18:29 Re: Performance Test for PostgreSQL9