Port Bug Report: Creating a table is not atomic.

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: Creating a table is not atomic.
Date: 1999-06-21 21:32:45
Message-ID: 199906212132.RAA24341@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Zalman Stern
Your email address : zalman(at)netcom(dot)com

Category : runtime: back-end: SQL
Severity : serious

Summary: Creating a table is not atomic.

System Configuration
--------------------
Operating System : Linux RedHat 5.2

PostgreSQL version : 6.5

Compiler used : gcc 2.7.2.3

Hardware:
---------
PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.3
48 megs RAM

Versions of other tools:
------------------------

--------------------------------------------------------------------------

Problem Description:
--------------------
Creating a table within a transaction and then aborting the transaction leaves state around that makes it imposible to create the table later. Notably, there is a file with the name of the table in the database directory.

--------------------------------------------------------------------------

Test Case:
----------
On a newly created database, I run the following with corresponding output:
Command: psql -p9000 -c'begin ; create table foo ("name" text) ; abort; create table foo ("name" text);' testdb
Output: ERROR: Relation 'foo' already exists
Command: psql -p9000 -c'select * from foo;' testdb
Output: ERROR: foo: Table does not exist.

--------------------------------------------------------------------------

Solution:
---------

--------------------------------------------------------------------------

Browse pgsql-ports by date

  From Date Subject
Next Message Unprivileged user 1999-06-22 09:21:47 Port Bug Report: select doesn't find entry
Previous Message Ray Mines 1999-06-21 21:28:38 postgres-6.5 and 6.4.2 do not compile