Bug: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index"

Started by Rusty Conoverover 19 years ago3 messagesbugs
Jump to latest
#1Rusty Conover
rconover@infogears.com

Under a period of high load it seems that creating a temporary tables
with the same name in separate postgres back-ends can trigger this
error:

ERROR: duplicate key violates unique constraint
"pg_type_typname_nsp_index"

The command that causes it is:

create temp table register_reqs(full_key text, register_index
integer) WITHOUT OIDS ON COMMIT DROP

Is this being caused by a race condition? Does the "create table"
command acquire any locks?

# select version();
version
------------------------------------------------------------------------
---------------------------
PostgreSQL 8.1.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
4.1.0 20060304 (Red Hat 4.1.0-3)
(1 row)

This is on Fedora Core 4.

Thanks,

Rusty
--
Rusty Conover
InfoGears Inc.
Web: http://www.infogears.com

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rusty Conover (#1)
Re: Bug: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index"

Rusty Conover <rconover@infogears.com> writes:

Under a period of high load it seems that creating a temporary tables
with the same name in separate postgres back-ends can trigger this
error:
ERROR: duplicate key violates unique constraint
"pg_type_typname_nsp_index"

Can you create a reproducible test case?

regards, tom lane

#3Rusty Conover
rconover@infogears.com
In reply to: Tom Lane (#2)
Re: Bug: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index"

On Oct 30, 2006, at 7:56 AM, Tom Lane wrote:

Rusty Conover <rconover@infogears.com> writes:

Under a period of high load it seems that creating a temporary tables
with the same name in separate postgres back-ends can trigger this
error:
ERROR: duplicate key violates unique constraint
"pg_type_typname_nsp_index"

Can you create a reproducible test case?

regards, tom lane

Hi Tom,

I'm able to reproduce it. It's happened twice in the last 8 hours.
I'm not yet able to provide an easy to trigger test case.

Rusty
--
Rusty Conover
InfoGears Inc.
Web: http://www.infogears.com