Re: set-level update fails with unique constraint violation

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: set-level update fails with unique constraint violation
Date: 2010-01-04 12:40:29
Message-ID: 14acc12c-3fde-46ce-9a56-7a4c3456fdc9@mm
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Fetter wrote:

> The DEFERRED uniqueness constraints in 8.5alpha3 fix this problem

That fix has a drawback: when the unique constraint is violated, the rest of
the transaction runs with data that is somehow corrupted, with duplicate
values being visible. It may be uneasy to predict if and how the statements
following the temporary-ignored constraint violation will misbehave.
Generally, the transaction will ultimately fail and the mess will be cleaned
up by the rollback, but in the worst case it may not even fail, for instance
if the offending rows get deleted before the end.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2010-01-04 12:41:31 Re: SELECT does not find table created by itself
Previous Message Dave Page 2010-01-04 12:15:20 Re: 8.5 Alpha3 - broken downloadlink