pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Simon Riggs <simon@2ndQuadrant.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Kevin Grittner <kgrittn@mail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: foreign key locks
Date: Mon, 05 Nov 2012 23:22:17 +0100
Message-ID: <m2zk2vg06e.fsf@2ndQuadrant.fr> (raw)
In-Reply-To: <20121031202209.GF23139@alvh.no-ip.org>
References: <20121029121833.306930@gmx.com>
	<20121031193536.GA1651@tornado.leadboat.com>
	<CA+U5nMKK8oOcoxTtMO9ZgT6YYGYH2RQoDt15RXXyMh+Sp0tNmA@mail.gmail.com>
	<20121031202209.GF23139@alvh.no-ip.org>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> FOR NON KEY UPDATE
>> FOR KEY UPDATE
>> 
>> KEY is the default, so FOR UPDATE is a synonym of FOR KEY UPDATE
>
> Not really sure about the proposed syntax, but yes clearly we need some
> other syntax to mean "FOR NON KEY UPDATE".  I would rather keep FOR
> UPDATE to mean what I currently call FOR KEY UPDATE.  More proposals for
> the other (weaker) lock level welcome (but if you love FOR NON KEY
> UPDATE, please chime in too)

FOR ANY UPDATE, synonym of FOR UPDATE
FOR KEY UPDATE, optimized version, when it applies to your case

I also tend to think that we should better not change the current
meaning of FOR UPDATE and have it default to FOR ANY UPDATE.

Unless it's easy to upgrade from ANY to KEY, and do that automatically
at the right time, but I fear there lie dragons (or something).

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support




view thread (74+ messages)  latest in thread

Message-ID: <m2zk2vg06e.fsf@2ndQuadrant.fr>
Permalink:  ../m2zk2vg06e.fsf@2ndQuadrant.fr/
Also on:    postgresql.org/message-id/m2zk2vg06e.fsf@2ndQuadrant.fr

 · 

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: dimitri@2ndQuadrant.fr, alvherre@2ndquadrant.com, simon@2ndQuadrant.com, noah@leadboat.com, kgrittn@mail.com, andres@2ndquadrant.com
  Subject: Re: foreign key locks
  In-Reply-To: <m2zk2vg06e.fsf@2ndQuadrant.fr>

* 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