pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-general@postgresql.org
Subject: Re: conditional insert
Date: Wed, 7 Sep 2011 16:04:54 -0400
Message-ID: <20110907200454.GV35347@shinkuro.com> (raw)
In-Reply-To: <CAHyXU0w__hAwXRujM_JxF-4tg_hRYc4JCY_-_3DiyjzE2aYR+w@mail.gmail.com>
References: <j4261h$lj8$1@dough.gmane.org>
	<CADFuJLi3K0X1A7OwR+9_neWjKCEXtYYyMP_n=x5z=D2+GNCTNw@mail.gmail.com>
	<4E64A79E.7030503@compulab.co.il>
	<CADFuJLjfHUMEuYTPKgG6GtJMfzJeeq3-bkt162RywRVqc7OYgg@mail.gmail.com>
	<4E64AC45.6030704@rem.nl>
	<20110906190548.433E8B5DBD1@mail.postgresql.org>
	<CAHyXU0zSE4aVoZhXL9i8hnSjRaJwOpmcrV+jfLKKY=OCdXhR6A@mail.gmail.com>
	<CAHyXU0x3jMadwoZFW8S5+g04VjBGURNUnEYN4ZzhmAy5CQaTGw@mail.gmail.com>
	<4e679195.12848e0a.019e.ffff918eSMTPIN_ADDED@mx.google.com>
	<CAHyXU0w__hAwXRujM_JxF-4tg_hRYc4JCY_-_3DiyjzE2aYR+w@mail.gmail.com>

On Wed, Sep 07, 2011 at 02:51:32PM -0500, Merlin Moncure wrote:
> 
> @andrew s: going SERIALIZABLE doesn't help if you trying to eliminate
> cases that would push you into retrying the transaction.

Well, no, of course.  But why not catch the failure and retry?  I
guess I just don't get the problem, since I hear people say this all
the time.  (I mean, I've also seen places where 'upsert' would be
cool, but it doesn't seem trivial to do in a general way and you can
do this with catch-serialization-error-and-retry, I think?)

A

-- 
Andrew Sullivan
ajs@crankycanuck.ca



view thread (36+ messages)  latest in thread

Message-ID: <20110907200454.GV35347@shinkuro.com>
Permalink:  ../20110907200454.GV35347@shinkuro.com/
Also on:    postgresql.org/message-id/20110907200454.GV35347@shinkuro.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 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-general@postgresql.org
  Cc: ajs@crankycanuck.ca
  Subject: Re: conditional insert
  In-Reply-To: <20110907200454.GV35347@shinkuro.com>
  References: <j4261h$lj8$1@dough.gmane.org> <CADFuJLi3K0X1A7OwR+9_neWjKCEXtYYyMP_n=x5z=D2+GNCTNw@mail.gmail.com> <4E64A79E.7030503@compulab.co.il> <CADFuJLjfHUMEuYTPKgG6GtJMfzJeeq3-bkt162RywRVqc7OYgg@mail.gmail.com> <4E64AC45.6030704@rem.nl> <20110906190548.433E8B5DBD1@mail.postgresql.org> <CAHyXU0zSE4aVoZhXL9i8hnSjRaJwOpmcrV+jfLKKY=OCdXhR6A@mail.gmail.com> <CAHyXU0x3jMadwoZFW8S5+g04VjBGURNUnEYN4ZzhmAy5CQaTGw@mail.gmail.com> <4e679195.12848e0a.019e.ffff918eSMTPIN_ADDED@mx.google.com> <CAHyXU0w__hAwXRujM_JxF-4tg_hRYc4JCY_-_3DiyjzE2aYR+w@mail.gmail.com> <20110907200454.GV35347@shinkuro.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