pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: pgsql-hackers@postgresql.org
Subject: [OSSTEST PATCH 0/1] PostgreSQL db: Retry on constraint violation
Date: Fri, 9 Dec 2016 18:26:30 +0000
Message-ID: <1481307991-16971-1-git-send-email-ian.jackson@eu.citrix.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hi.  This message is going to xen-devel (because that's where the
osstest project is) and to pgsql-hackers (because I hope they may be
able to advise about the scope of the PostgreSQL SERIALIZABLE
constraint problem).

In summary: PostgreSQL only provides transaction serialisability for
successful transactions.  Even with SERIALIZABLE, transactions may
fail due to spurious and "impossible" constraint violations.

As a result, I need to make osstest retry transactions not only on
explicitly reported serialisation failures and deadlocks, but also on
integrity violations.

It is not clear to me from the thread
  WIP: Detecting SSI conflicts before reporting constraint violations
which was on pgsql-hackers earlier this year, whether it is only
unique constraint violations which may spuriously occur.

Can anyone from the PostgreSQL hacker community advise ?  The existing
documentation patch just talks about "successful" transactions, and
uses unique constraints as an example.  In principle this leaves open
the possibility that the transaction might fail with bizarre and
unpredictable error codes, although I hope this isn't possible.

It would be good to narrow the scope of the retries in my system as
much as possible.

I'm hoping to get an authoritative answer here but it seems that this
is a common problem to which there is still not yet a definitive
solution.  I would like there to be a definitive solution.

If I get a clear answer I'll submit a further docs patch to pgsql :-).

Thanks,
Ian.


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (35+ messages)  latest in thread

Message-ID: <1481307991-16971-1-git-send-email-ian.jackson@eu.citrix.com>
Permalink:  ../1481307991-16971-1-git-send-email-ian.jackson@eu.citrix.com/
Also on:    postgresql.org/message-id/1481307991-16971-1-git-send-email-ian.jackson@eu.citrix.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xenproject.org
  Subject: Re: [OSSTEST PATCH 0/1] PostgreSQL db: Retry on constraint violation
  In-Reply-To: <1481307991-16971-1-git-send-email-ian.jackson@eu.citrix.com>

* 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