Re: can we add SKIP LOCKED to UPDATE?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: can we add SKIP LOCKED to UPDATE?
Дата
Msg-id CANP8+j+u02V3RJqRYOKUhVZ4CZE0wNLGmsu282pOh2wz7WevSQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: can we add SKIP LOCKED to UPDATE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 9 November 2015 at 17:06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
德哥 <digoal@126.com> writes:
>    PostgreSQL 9.5 added skip locked to select for update to improve concurrency performance, but why not add it to update sql?

Seems like you'd have unpredictable results from the update then.

True, but given the already restricted use case of SKIP LOCKED, the request makes sense for the following

UPDATE ...
SKIP LOCKED
RETURNING xxx

would be better than

BEGIN

SELECT  xxx
FOR UPDATE
SKIP LOCKED 

UPDATE

COMMIT

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Some questions about the array.
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: Using quicksort for every external sort run