Re: Massive parallel queue table causes index deterioration, butREINDEX fails with deadlocks. - Mailing list pgsql-performance

From Peter Geoghegan
Subject Re: Massive parallel queue table causes index deterioration, butREINDEX fails with deadlocks.
Date
Msg-id CAH2-Wz=4tF9kxWsR8w=FrZHYaQ-vqegE7OeJaEfcuJDfKiW+DA@mail.gmail.com
Whole thread Raw
In response to Massive parallel queue table causes index deterioration, but REINDEX fails with deadlocks.  (Gunther <raj@gusw.net>)
Responses Re: Massive parallel queue table causes index deterioration, butREINDEX fails with deadlocks.
List pgsql-performance
On Sat, Feb 23, 2019 at 1:06 PM Gunther <raj@gusw.net> wrote:
> I thought to keep my index tight, I would define it like this:
>
> CREATE UNIQUE INDEX Queue_idx_pending ON Queue(jobId) WHERE pending;
>
> so that only pending jobs are in that index.
>
> When a job is done, follow up work is often inserted into the Queue as pending, thus adding to that index.

How many distinct jobIds are there in play, roughly? Would you say
that there are many fewer distinct Jobs than distinct entries in the
index/table? Is the number of jobs fixed at a fairly low number, that
doesn't really grow as the workload needs to scale up?

-- 
Peter Geoghegan


pgsql-performance by date:

Previous
From: Gunther
Date:
Subject: Massive parallel queue table causes index deterioration, but REINDEX fails with deadlocks.
Next
From: Gunther
Date:
Subject: Re: Massive parallel queue table causes index deterioration, butREINDEX fails with deadlocks.