pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Nathan Bossart <nathandbossart@gmail.com>
To: Greg Burd <greg@burd.me>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Expanding HOT updates for expression and partial indexes
Date: Tue, 24 Mar 2026 14:44:38 -0500
Message-ID: <acLppkl4hutHhiuH@nathan> (raw )
In-Reply-To: <db765e0d-4674-4547-9a9d-6d4d9a0a123c@app.fastmail.com >
References: <811d6f42e5481935943556b692859aae9146d4c9.camel@j-davis.com >
<b0404aab-65a1-4922-9cff-986163ad70bb@app.fastmail.com >
<7b8681a578b5fe77103948eeb7b5cdd80fabad5d.camel@j-davis.com >
<4f48f75d-4f2a-4240-b66d-597517796e02@app.fastmail.com >
<3fba3f5671eddb221ba38f5a12acbe7cad27edf3.camel@j-davis.com >
<427bfbda-c901-49e4-b725-8ddc41bec23d@app.fastmail.com >
<887b1ee62794553a95c3578fcdc0cc1831e68b27.camel@j-davis.com >
<d7489d3e-2cbd-4b0f-b662-b5c4386a3f1e@app.fastmail.com >
<acGI-wnW4NxS87e0@nathan >
<db765e0d-4674-4547-9a9d-6d4d9a0a123c@app.fastmail.com >
On Tue, Mar 24, 2026 at 02:02:07PM -0400, Greg Burd wrote:
> On Mon, Mar 23, 2026, at 2:39 PM, Nathan Bossart wrote:
>> On Tue, Mar 17, 2026 at 02:04:11PM -0400, Greg Burd wrote:
>>> - * INDEX_ATTR_BITMAP_SUMMARIZED Columns included in summarizing indexes
>>> + * INDEX_ATTR_BITMAP_INDEXED Columns referenced by indexes
>>> + * INDEX_ATTR_BITMAP_SUMMARIZED Columns only included in summarizing indexes
>>
>>> - Bitmapset *summarizedattrs; /* columns with summarizing indexes */
>>> + Bitmapset *indexedattrs; /* columns referenced by indexes */
>>> + Bitmapset *summarizedattrs; /* columns only in summarizing indexes */
>>
>> As before, the comment changes for the summarized-attr-related stuff seem
>> unnecessary.
>
> I disagree, the "only" is required to highlight the logic change here.
> Before this patch summarized attrs could overlap with indexed attrs, now
> it should not. This makes the logic a bit easier later in
> HeapUpdateHotAllowable().
My bad, you are right.
> So, we go from 3 calls to RelationGetIndexAttrBitmap() to 1, or at most 2
> when there's a summarizing index (which is frequently the case).
>
> This feels more logical, cleaner, and has less overhead but supports the
> same HOT logic.
Nice.
--
nathan
view thread (87+ messages) latest in thread
Message-ID: <acLppkl4hutHhiuH@nathan>
Permalink: ../acLppkl4hutHhiuH@nathan/
Also on: postgresql.org/message-id/acLppkl4hutHhiuH@nathan
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, greg@burd.me, pgsql@j-davis.com
Subject: Re: Expanding HOT updates for expression and partial indexes
In-Reply-To: <acLppkl4hutHhiuH@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox