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

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: BUG #2265: CREATE TABLE when AUTOCOMMIT is OFF
Дата
Msg-id 20060217174608.GA45200@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: BUG #2265: CREATE TABLE when AUTOCOMMIT is OFF  (Michael Fuhr <mike@fuhr.org>)
Список 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.Lutz@mbtech-group.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: BUG #2269: cannot connect to postgres database on Linux
Следующее
От: "Elias"
Дата:
Сообщение: BUG #2270: not accepted user and password