From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Simon Riggs <simon(at)2ndQuadrant(dot)com>, Kevin Grittner <kgrittn(at)mail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: foreign key locks |
Date: | 2012-10-31 21:01:29 |
Message-ID: | 20121031210129.GD29247@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 31, 2012 at 05:22:10PM -0300, Alvaro Herrera wrote:
> Simon Riggs wrote:
> > On 31 October 2012 19:35, Noah Misch <noah(at)leadboat(dot)com> wrote:
> > > +1. I had not considered this angle during previous reviews, but I agree with
> > > Andres's position. Since this patch does not strengthen the strongest tuple
> > > lock relative to its PostgreSQL 9.2 counterpart, that lock type should
> > > continue to use the syntax "FOR UPDATE". It will come to mean "the lock type
> > > sufficient for all possible UPDATEs of the row".
>
> Yeah, I agree with this too.
>
> > So we have syntax
> >
> > 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)
Agree on having "FOR UPDATE" without any "FOR KEY UPDATE" synonym. For the
weaker lock, I mildly preferred the proposal of "FOR NO KEY UPDATE". NON KEY
captures the idea better in English, but NO is close enough and already part
of the SQL lexicon.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-10-31 23:05:07 | Re: [COMMITTERS] pgsql: Fix erroneous choices of segNo variables |
Previous Message | Alvaro Herrera | 2012-10-31 20:22:10 | Re: foreign key locks |