pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Kevin Grittner <kgrittn@mail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: foreign key locks
Date: Thu, 10 Jan 2013 22:22:18 +0100
Message-ID: <20130110212218.GE4329@awork2.anarazel.de> (raw)
In-Reply-To: <20130110210040.GB4110@alvh.no-ip.org>
References: <20121129152326.69330@gmx.com>
	<20121129160220.GA4942@alvh.no-ip.org>
	<20121129161654.GB4942@alvh.no-ip.org>
	<b1a78c715f9195e6f96546c8e723afd8.squirrel@webmail.xs4all.nl>
	<20121228204847.GD4150@alvh.no-ip.org>
	<20130110210040.GB4110@alvh.no-ip.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2013-01-10 18:00:40 -0300, Alvaro Herrera wrote:
> Here's version 28 of this patch.  The only substantive change here from
> v26 is that I've made GetTupleForTrigger() use either LockTupleExclusive
> or LockTupleNoKeyExclusive, depending on whether the key columns are
> being modified by the update.  This needs to go through EvalPlanQual, so
> that function is now getting the lock mode as a parameter instead of
> hardcoded LockTupleExclusive.  (All other users of GetTupleForTrigger
> still use LockTupleExclusive, so there's no change for anybody other
> than FOR EACH ROW BEFORE UPDATE triggers).

Is that enough in case of a originally non-key update in read committed
mode that turns into a key update due to a concurrent key update?

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
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 (74+ messages)  latest in thread

Message-ID: <20130110212218.GE4329@awork2.anarazel.de>
Permalink:  ../20130110212218.GE4329@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20130110212218.GE4329@awork2.anarazel.de

 · 

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: andres@2ndquadrant.com, alvherre@2ndquadrant.com, er@xs4all.nl, kgrittn@mail.com
  Subject: Re: foreign key locks
  In-Reply-To: <20130110212218.GE4329@awork2.anarazel.de>

* 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