Re: ERROR: Cannot insert a duplicate key into unique index pg_class_relname_nsp_index

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Kragen Sitaker <kragen+pgsql(at)airwave(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: Cannot insert a duplicate key into unique index pg_class_relname_nsp_index
Date: 2004-01-10 00:20:11
Message-ID: 20040110002011.GA5784@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 09, 2004 at 12:07:25PM -0800, Kragen Sitaker wrote:
<snip>

Not really related to your problem, but given you're in a transaction, why
do you need to lock anything? What's wrong with:

> The daemon that gets this error does the following every 15 seconds:
> - start a transaction
> - delete the contents of the other table
> - execute a complex and sometimes slow SELECT INTO query, creating a
> temporary table
> - copy the contents of the temporary table into the other table
> - drop the temporary table (again, embarrassing, sorry)
> - commit

Maybe I'm missing something?
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> (... have gone from d-i being barely usable even by its developers
> anywhere, to being about 20% done. Sweet. And the last 80% usually takes
> 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2004-01-10 00:32:35 Re: no space left on device
Previous Message Mark Kirkwood 2004-01-09 23:46:11 Re: no space left on device