Re: BUG #2265: CREATE TABLE when AUTOCOMMIT is OFF

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Gerhard(dot)Lutz(at)mbtech-group(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2265: CREATE TABLE when AUTOCOMMIT is OFF
Date: 2006-02-17 17:46:08
Message-ID: 20060217174608.GA45200@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Please copy the pgsql-bugs mailing list on replies. Also, if you've
submitted multiple bug reports then please keep the discussion of
each bug in their respective threads. I'm replying only to 2265
because I'm not as familiar with the other problems.

On Fri, Feb 17, 2006 at 03:09:48PM +0100, Gerhard(dot)Lutz(at)mbtech-group(dot)com wrote:
> Now I configured query logging and I saw what was wrong.
> First I executed
>
> SELECT rel FROM versions
>
> but the 'versions' table didn't exist. So I thought that I can create this
> 'versions' table in the
> same transaction. In PostgreSQL 8.0.4 this worked, but in 8.1.3 I got the
> error message.

When you say that "this" worked in 8.0.4 but not in 8.1.3, what
exactly do you mean by "this"? If the SELECT failed then any
subsequent command in the same transaction should also have failed;
8.0 and 8.1 shouldn't differ in that respect, at least not in the
backend. If you can demonstrate otherwise then please post a
repeatable test case (i.e., a set of SQL statements that can be run
against an empty database in a new session or a new transaction).
Try running tests with psql as well as with ODBC to see if they
behave differently.

> When executing COMMIT after the SELECT statement, I was able to do the
> CREATE TABLE.
> I think that this behaviour is desired in 8.1.3, am I right? It surely has
> to do with the two-phase commit.

Are you using two-phase commit? Why do you think it's "surely"
involved? Let's see a complete test case before jumping to
conclusions.

--
Michael Fuhr

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Elias 2006-02-17 20:29:11 BUG #2270: not accepted user and password
Previous Message Dave Page 2006-02-17 10:56:16 Re: BUG #2269: cannot connect to postgres database on Linux