pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: pgsql-general@postgresql.org
Subject: Re: Delay INSERT
Date: 23 Mar 2005 12:02:35 -0500
Message-ID: <871xa670t0.fsf@stark.xeocode.com> (raw)
In-Reply-To: <758d5e7f05032308342828a03f@mail.gmail.com>
References: <20050321131047.93504.qmail@web53406.mail.yahoo.com>
	<20050321161555.GA22145@winnie.fuhr.org>
	<14435275218.20050323193122@on.kg>
	<42418247.7070108@archonet.com>
	<758d5e7f05032308342828a03f@mail.gmail.com>

Dawid Kuroczko <qnex42@gmail.com> writes:

> PostgreSQL doesn't have such issues with blocking, so only difference
> between INSERT and INSERT DELAYED from PostgreSQL's standpoint
> would be waiting and not for the result...

An insert can be blocked if there's a UNIQUE constraint and another
transaction has an insert or update pending for the same key. If the other
transaction commits you get a unique constraint violation, if it aborts your
insert succeeds.

-- 
greg




view thread (12+ messages)  latest in thread

Message-ID: <871xa670t0.fsf@stark.xeocode.com>
Permalink:  ../871xa670t0.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/871xa670t0.fsf@stark.xeocode.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-php@postgresql.org
  Cc: gsstark@mit.edu, pgsql-general@postgresql.org
  Subject: Re: Delay INSERT
  In-Reply-To: <871xa670t0.fsf@stark.xeocode.com>
  References: <20050321131047.93504.qmail@web53406.mail.yahoo.com> <20050321161555.GA22145@winnie.fuhr.org> <14435275218.20050323193122@on.kg> <42418247.7070108@archonet.com> <758d5e7f05032308342828a03f@mail.gmail.com> <871xa670t0.fsf@stark.xeocode.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