pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bhakti Ghatkar <bghatkar@zedo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Vacuum problem due to temp tables
Date: Sat, 26 Feb 2011 12:25:32 -0500
Message-ID: <20323.1298741132@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTineeujsU3s2Jt+gyp0RviXgpTHBt1A=TaYQDeQW@mail.gmail.com>
References: <AANLkTineeujsU3s2Jt+gyp0RviXgpTHBt1A=TaYQDeQW@mail.gmail.com>

Bhakti Ghatkar <bghatkar@zedo.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



view thread (6+ messages)  latest in thread

Message-ID: <20323.1298741132@sss.pgh.pa.us>
Permalink:  ../20323.1298741132@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20323.1298741132@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bghatkar@zedo.com
  Subject: Re: Vacuum problem due to temp tables
  In-Reply-To: <20323.1298741132@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