Search Postgresql Archives

Re: ERROR: type "foo_20110307_id_seq" already exists (expected relation "foo_20110307_id_seq" already exists)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Marc Mamin" <M.Mamin@xxxxxxxxxxxx> writes:
> By trying to create a sequence that already exists, I'd expect an error
> like 
> relation "foo_20110307_id_seq" already exists, 
> and not
> type "foo_20110307_id_seq" already

My recollection is that it's possible to get the latter if multiple
sessions try to create the same relation name concurrently.  The initial
check for "does the relation already exist" fails for both sessions,
so they plow ahead, and then you're at the mercy of timing as to whether
you get a unique-index violation on pg_class or pg_type.  It may well
also vary as to which PG version you're using.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux