Re: BUG #4445: Atomic transaction problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4445: Atomic transaction problem
Дата
Msg-id 10748.1222781204@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4445: Atomic transaction problem  ("Santosh" <sbhujbal@starentnetworks.com>)
Список pgsql-bugs
"Santosh" <sbhujbal@starentnetworks.com> writes:
> My application is runtime adding new columns in both the tables.
> That operation is atomic like:
> sql="BEGIN TRANSACTION;";
> PQexec (pgConn, sql);
> sql="ALTER TABLE old ADD COLUMN new_col bigint;";
> PQexec (pgConn, sql);
> sql="ALTER TABLE current ADD COLUMN new_col bigint;";
> PQexec (pgConn, sql);
> sql="END TRANSACTION;";
> PQexec (pgConn, sql);

Have you simply omitted error checking from your report, or did your
code actually not bother to check for errors?  If for some odd reason
the BEGIN command failed, and you kept going anyway, then the subsequent
commands would have been executed in their own transactions.

I tried the reported case here, just to verify, and an ALTER TABLE in a
transaction that is then aborted by fast shutdown definitely does not
take effect.  So I think this is pilot error of some sort.

> Is there any known, reported issue/bug in postgres version 8.2.0?

8.2.0?  Yes, quite a few.
http://www.postgresql.org/docs/8.2/static/release.html
But this report doesn't match any of them.

            regards, tom lane

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

Предыдущее
От: "Santosh"
Дата:
Сообщение: BUG #4445: Atomic transaction problem
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #4444: Wrong formated pdf manual