Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-11 Thread Torsten Zühlsdorff
On 10.11.2015 07:23, Craig Ringer wrote: On 10 November 2015 at 01:38, Jeff Janes wrote: this would be handy in conjunction with LIMIT (which also doesn't exist for UPDATE right now). ... and, in turn, UPDATE ... ORDER BY ..., since LIMIT without ORDER BY is usually

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-11 Thread Craig Ringer
On 11 November 2015 at 16:02, Torsten Zühlsdorff < mailingli...@toco-domains.de> wrote: > From my experience most databases are just tpo small. Their operations > finish before there can be a deadlock. Same for race conditions - most > developer don't know about them, because they never stumbled

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-11 Thread Greg Stark
On Wed, Nov 11, 2015 at 6:57 PM, Gavin Flower wrote: > Don't you realize that 400MB is over 4 million of the old 100Kb floppy > disks, and even with the new big 1.44MB 3.5 " disks, you'd need about 280!!! Don't be silly. It's only four thousand 100Kb floppies. --

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-11 Thread Gavin Flower
On 12/11/15 13:52, Greg Stark wrote: On Wed, Nov 11, 2015 at 6:57 PM, Gavin Flower wrote: Don't you realize that 400MB is over 4 million of the old 100Kb floppy disks, and even with the new big 1.44MB 3.5 " disks, you'd need about 280!!! Don't be silly. It's

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-11 Thread Gavin Flower
On 12/11/15 02:07, Craig Ringer wrote: On 11 November 2015 at 16:02, Torsten Zühlsdorff > wrote: From my experience most databases are just tpo small. Their operations finish before there can be a deadlock. Same for

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-10 Thread 德哥
HI, My case is concurrency update one row(for exp 1000 client update the same row at the same time), and target is prevent waiting for waiters(quick return to client). use advisory lock is a method, for quick return. but not good , must use function(to reduce consume between client-db network).

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-09 Thread Jeff Janes
On Mon, Nov 9, 2015 at 9:06 AM, Tom Lane wrote: > =?GBK?B?tcK45w==?= 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

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-09 Thread Simon Riggs
On 9 November 2015 at 17:06, Tom Lane wrote: > =?GBK?B?tcK45w==?= 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

[HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-09 Thread 德哥
HI, PostgreSQL 9.5 added skip locked to select for update to improve concurrency performance, but why not add it to update sql? this is an application case, some body will update a tuple at the same time, so the RT for waiter is big, I use function and select for update nowait or

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-09 Thread Tom Lane
=?GBK?B?tcK45w==?= 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. regards, tom lane -- Sent

Re: [HACKERS] can we add SKIP LOCKED to UPDATE?

2015-11-09 Thread Craig Ringer
On 10 November 2015 at 01:38, Jeff Janes wrote: > this would be handy in conjunction with LIMIT > (which also doesn't exist for UPDATE right now). ... and, in turn, UPDATE ... ORDER BY ..., since LIMIT without ORDER BY is usually not a great choice. I'd quite like to see