On 9 November 2015 at 17:06, Tom Lane <t...@sss.pgh.pa.us> wrote: > =?GBK?B?tcK45w==?= <dig...@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/ <http://www.2ndquadrant.com/> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services