Problem - Error: Cannot create table - Mailing list pgsql-general

From Jens Niehaus
Subject Problem - Error: Cannot create table
Date
Msg-id 199903041607.RAA03201@c64.informatik.uni-dortmund.de
Whole thread Raw
Responses doing SQL lookup to postgres from Foxpro  ("William J. Stotts" <wstotts@sonitrol.net>)
List pgsql-general
Hello,

i've problems creating a table which was already created in an earlier
transaction which crashed before completion (PostgreSQL 6.4.0, linux 2.0.36,
libc-5.4):

>postgres:> psql example
>[...]
>example=> BEGIN TRANSACTION;
>BEGIN
>example=> CREATE TABLE corrupt (name int4);
>CREATE

now the psql-process receives a SIGKILL from somewhere else

>postgres:> ps |grep psql
1234  p5 S    0:00 psql example
>postgres:> kill -9 1234

this results in

>example=> Killed

When I try to create the table again:

>postgres:> psql example
>[...]
>example=> BEGIN TRANSACTION;
>BEGIN
>example=> CREATE TABLE corrupt (name int4);
>ERROR:  cannot create corrupt
>beispiel=> END TRANSACTION;
>END
>example=> DROP TABLE CORRUPT;
>ERROR:  Relation corrupt Does Not Exist!


The same thing happens when i try somthing like 'PQexec(conn,"BEGIN");PQexec(co
nn,"CREATE...");exit(1);' with libpq.

Is there a way to fix it and to create the table again?


Thanks,
        Jens


pgsql-general by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error
Next
From: "William J. Stotts"
Date:
Subject: doing SQL lookup to postgres from Foxpro