Re: CREATE DATABASE/DROP DATABASE race conditions

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>
Cc: pgsql-bugs@postgresql.org
Date: 2002-07-14T17:13:32Z
Lists: pgsql-bugs
Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> writes:
> I'm observing weird behavior with CREATE DATABASE/DROP DATABASE and
> PostgreSQL 7.2.1 (on Debian/unstable): There seems to be a short time
> period after the 'Z' response of the backend during which the database
> continues to exist (e.g. subsequent CREATE DATABASE operations with
> the same name fail) or does not exist yet (e.g. it is not possible to
> connect to the database).

> You cannot reproduce this with "psql" or "createdb"/"dropdb".

I'm inclined to think it's a bug in your application coding, then.
psql certainly doesn't go out of its way to serialize operations.

Could we see a self-contained test case?

			regards, tom lane