From: | "Santosh" <sbhujbal(at)starentnetworks(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4445: Atomic transaction problem |
Date: | 2008-09-30 12:36:12 |
Message-ID: | 200809301236.m8UCaCVX059231@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4445
Logged by: Santosh
Email address: sbhujbal(at)starentnetworks(dot)com
PostgreSQL version: 8.2.0
Operating system: Sun-Solaris
Description: Atomic transaction problem
Details:
Hi All,
Following are the details of my application setup:
Platform: Sun-solaris 9
Application written in 'C++'.
Postgres interface: libpq 'C' interface.
Postgres version: 8.2.0
I have two tables, 'old' and 'current' in database.
'current' table contains latest one months records and 'old' table contains
records older than one month.
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);
Because of some reason I have shutdown the postgres with -m (fast shutdown)
option.
At the same time my application was adding the columns in tables.
Because of the shutdown, column gets added in 'old' table but not in
'current' table.
Now there is mismatch in schemas of both the tables.
Ideally this should not happen as the operation is atomic.
Following is the postgres log from log file:
============================================================================
=
2008-09-24 04:08:39 CEST LOG: received fast shutdown request
2008-09-24 04:08:39 CEST LOG: aborting any active transactions
2008-09-24 04:08:39 CEST bsdb FATAL: terminating connection due to
administrator command
2008-09-24 04:08:39 CEST bsdb STATEMENT: ALTER TABLE current ADD COLUMN
new_col bigint;
2008-09-24 04:08:39 CEST LOG: shutting down
2008-09-24 04:08:40 CEST LOG: database system is shut down
============================================================================
=
What is the reason of above postgres behavior?
Is there any known, reported issue/bug in postgres version 8.2.0?
Is this issue fixed in latest postgres releases?
Thanks in advance.
Santosh.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-09-30 13:26:44 | Re: BUG #4445: Atomic transaction problem |
Previous Message | Tom Lane | 2008-09-30 12:31:24 | Re: BUG #4443: Dblink wrong output on trigger |