Re: Left lateral join with for update and skip locked - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Left lateral join with for update and skip locked
Date
Msg-id 12129.1426686198@sss.pgh.pa.us
Whole thread Raw
In response to Left lateral join with for update and skip locked  (Benjamin Börngen-Schmidt<benjamin@boerngen-schmidt.de>)
List pgsql-hackers
Benjamin Börngen-Schmidt <benjamin@boerngen-schmidt.de> writes:
> The Lateral statement does return a result, which I do not expect. I 
> returns an end point multiple times for diverent start points. Why? I 
> thought, that the selected point by the lateral is locked by the FOR 
> UPDATE and if the lateral selects a point that is already locked it will 
> be skipped by the SKIP LOCKED.

It sounds like you think SKIP LOCKED means to skip rows locked by your own
transaction.  That's not what it does, AFAIK.  It skips rows you couldn't
get a lock on without waiting ... but if you already have a lock, that's
fine.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Kouhei Kaigai
Date:
Subject: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Next
From: Tom Lane
Date:
Subject: Re: Future directions for inheritance-hierarchy statistics