Re: Left lateral join with for update and skip locked

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Left lateral join with for update and skip locked
Дата
Msg-id 12129.1426686198@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Left lateral join with for update and skip locked  (Benjamin Börngen-Schmidt<benjamin@boerngen-schmidt.de>)
Список 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 по дате отправления:

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Future directions for inheritance-hierarchy statistics