interrupted createdb leaves dirty system tables - Mailing list pgsql-bugs

From Reece Hart
Subject interrupted createdb leaves dirty system tables
Date
Msg-id 4C25ADE1.9070405@berkeley.edu
Whole thread Raw
Responses Re: interrupted createdb leaves dirty system tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Josh Berkus asked that I send the following observation to bugs:


I executed and quickly interrupted (^C) createdb that was connected to a
remote cluster via TCP/IP. The interruption left system tables in a
dirty state such that a subsequent invocation warned of a uniqueness
violation in pg_database_datname_index. The transcript follows:

unison$ sudo -u postgres createdb reece
^C
unison$ sudo -u postgres createdb -O reece reece
createdb: database creation failed: ERROR:  duplicate key value violates
unique constraint "pg_database_datname_index"
unison$ sudo -u postgres createdb -O reece reece
createdb: database creation failed: ERROR:  database "reece" already exists
unison$ sudo -u postgres dropdb reece
unison$ sudo -u postgres createdb -O reece reece

The second createdb appears to succeed despite the warning, and the
database can be dropped and created again successfully and without
further ado.

This bug is likely to be very sensitive to timing and I didn't bother
trying to recreate it.

Local and remote systems are Ubuntu 10.04 running the distro version of
PG 8.4.4.

-Reece

--
Reece Hart, Ph.D.
Chief Scientist, Genome Commons                http://genomecommons.org/
Center for Computational Biology / QB3         324G Stanley Hall
University of California, Berkeley             Berkeley, CA 94720

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Postgres on AIX5.3 and AIX6.1
Next
From: Tom Lane
Date:
Subject: Re: interrupted createdb leaves dirty system tables