From: legoharyanto@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #7529: Support different error handling behavior than auto rollback
Date: Mon, 10 Sep 2012 20:22:52 +0000
Message-ID: <E1TBAVQ-0002tp-S7@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 7529
Logged by: Lego Haryanto
Email address: legoharyanto@gmail.com
PostgreSQL version: 9.0.5
Operating system: Any
Description:
I understand that current transaction behavior in PostgreSQL is to throw
away the whole transaction away (rollback) if there's at least one error
within the transaction.
I believe on certain application of data replication, say, migration from
other database source, ... this will be pretty cumbersome to support in
PostgreSQL even though users have some conflict resolution strategy in
mind.
On the following scenario, imagine this transaction is coming from a source
of different DB, migrating into a PostgreSQL target.
BEGIN
INSERT #1... (success)
INSERT #2... (success)
INSERT #3... (error or conflict/collision)
INSERT #4... (success)
COMMIT;
Current behavior of PostgreSQL is that the INSERT #4 command is ignored
because of the error on INSERT #3 (subsequent commands are ignored).
And the COMMIT command is accepted as ROLLBACK, which we can argue it's
misleading because user does an explicit COMMIT, but the actual action is a
rollback.
Can we actually support honoring the successful DMLs above, and do the
actual COMMIT that is inserting #1, #2, and #4 in above example?
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-bugs@postgresql.org
Cc: legoharyanto@gmail.com
Subject: Re: BUG #7529: Support different error handling behavior than auto rollback
In-Reply-To: <E1TBAVQ-0002tp-S7@wrigleys.postgresql.org>
References: <E1TBAVQ-0002tp-S7@wrigleys.postgresql.org>
* 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