Re: Massive parallel queue table causes index deterioration, but REINDEX fails with deadlocks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 23, 2019 at 4:06 PM Gunther <raj@xxxxxxxx> wrote:

the dequeue operation is essentially this:

BEGIN

SELECT jobId, action
  FROM Queue 
  WHERE pending
  FOR UPDATE SKIP LOCKED

There is no LIMIT shown.  Wouldn't the first thread to start up just lock all the rows and everyone else would starve?

Cheers,

Jeff

PNG image


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux