Re: [PATCH] Don't block HOT update by BRIN index

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Don't block HOT update by BRIN index
Date: 2021-07-12 21:00:05
Message-ID: 84c15c3b-359e-5e2e-5a7a-aa0889241e6a@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/12/21 10:55 PM, Alvaro Herrera wrote:
> On 2021-Jul-12, Tomas Vondra wrote:
>
>> Well, one of us is confused and it might be me ;-)
>
> :-)
>
>> The point is that BRIN is the only index type with amhotblocking=false,
>> so it would return NULL (and thus it does not block HOT). All other
>> indexes AMs have amblocking=true and so should return rd_indexattr (I
>> forgot to change that in the code chunk).
>
> But RelationGetIndexAttrBitmap is called for the table that contains the
> index (and probably contains some other indexes too), not for one
> specific index. So the bitmap is about the columns involved in *all*
> indexes of the table ...
>

D'oh! Well, I did say I might be confused ...

Yeah, that optimization is not possible, unfortunately.

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-07-12 21:02:09 Re: [PATCH] Don't block HOT update by BRIN index
Previous Message Matthias van de Meent 2021-07-12 20:57:15 Re: Fix comments of heap_prune_chain()