From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Predicate Locks for writes? |
Date: | 2017-10-11 14:33:32 |
Message-ID: | CA+TgmobboJhp-tGHnTQiOcraOMMP=ZK7k+AX+pLCnaK1ZoYvyA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Oct 7, 2017 at 7:26 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> PredicateLockTuple() specifically avoids adding an SIRead lock if the
> tuple already has a write lock on it, so surely it must also be
> correct to skip the SIRead lock if we are just about to update the
> row?
I wonder if there's a race condition. Can someone else read/update
the tuple between the time when we would've taken the SIRead lock and
the time when we would have gotten the actual tuple lock?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-11 14:38:40 | Re: pg_regress help output |
Previous Message | Robert Haas | 2017-10-11 14:28:05 | Re: [PATCH] A hook for session start |