interrupted createdb leaves dirty system tables

From: Reece Hart <reece(at)berkeley(dot)edu>
To: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: interrupted createdb leaves dirty system tables
Date: 2010-06-26 07:36:01
Message-ID: 4C25ADE1.9070405@berkeley.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-06-27 21:27:42 Re: interrupted createdb leaves dirty system tables
Previous Message Robert Haas 2010-06-25 16:56:15 Re: Postgres on AIX5.3 and AIX6.1