"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