From: Marko Ristola <marko.ristola@kolumbus.fi>
To: 'pgsql-odbc@postgresql.org' <pgsql-odbc@postgresql.org>
Subject: Transactions and savepoints
Date: Sat, 26 Mar 2005 11:54:43 +0200
Message-ID: <42453163.6060508@kolumbus.fi> (raw)
Hello.
I have been thinking about savepoints.
What do you think about the following:
Create transaction.h and transaction.c.
They would keep the knoledge about the following things:
- Current transaction state (is in autocommit mode, in transaction,
and the savepoint stack structure.
- Each transaction stack point would maintain a list of open cursors.
The stack would contain the following things:
- At the bottom of the stack is the autocommit mode (tr[0]).
- tr[1] contains the transaction's BEGIN block state.
- tr[2] contains the information about the first savepoint.
This would make the savepoint rollback work with cursors:
ODBC side manages the open cursors during savepoint rollback.
Rolling back a savepoint destroys that savepoint's and the later savepoint's
cursors. ODBC must not try to close the cursor after rollback,
or a database error occurs.
What do you think? Is this transaction state tracking necessary in the
ODBC side? Or does or will the database backend handle this some day
some way?
Marko Ristola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: marko.ristola@kolumbus.fi
Subject: Re: Transactions and savepoints
In-Reply-To: <42453163.6060508@kolumbus.fi>
References: <42453163.6060508@kolumbus.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox