pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7529: Support different error handling behavior than auto rollback
2+ messages / 2 participants
[nested] [flat]

* BUG #7529: Support different error handling behavior than auto rollback
@ 2012-09-10 20:22  legoharyanto@gmail.com
  0 siblings, 1 reply; 2+ messages in thread

From: legoharyanto@gmail.com @ 2012-09-10 20:22 UTC (permalink / raw)
  To: pgsql-bugs

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?






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #7529: Support different error handling behavior than auto rollback
@ 2012-09-11 14:47  Pavel Stehule <pavel.stehule@gmail.com>
  parent: legoharyanto@gmail.com
  0 siblings, 0 replies; 2+ messages in thread

From: Pavel Stehule @ 2012-09-11 14:47 UTC (permalink / raw)
  To: legoharyanto@gmail.com; +Cc: pgsql-bugs

Hello

this is not bug - please, can you send your proposal to pg_hackers mailing list?

Regards

Pavel Stehule

2012/9/10  <legoharyanto@gmail.com>:
> 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?
>
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-09-11 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-10 20:22 BUG #7529: Support different error handling behavior than auto rollback legoharyanto@gmail.com
2012-09-11 14:47 ` Pavel Stehule <pavel.stehule@gmail.com>

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