public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Geoghegan <[email protected]>
To: Andres Freund <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Alexandre Felipe <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: Nazir Bilal Yavuz <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Melanie Plageman <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Georgios <[email protected]>
Cc: Konstantin Knizhnik <[email protected]>
Cc: Dilip Kumar <[email protected]>
Subject: Re: index prefetching
Date: Sat, 4 Apr 2026 19:35:28 -0400
Message-ID: <CAH2-Wzng2c2RtgENok68XON8i1ypeQteXTmzcQyEjrqecnEd2w@mail.gmail.com> (raw)
In-Reply-To: <e6avgxqkonquofdstnvt5zq72x6zmolz5vojshk2b3ptsksdmw@2mf4bmp4pank>
References: <t6mtqbv2mbfhjni4bvwdgoecppjmxvbyfwl6utovzv76xc2672@k3o5ryevaeqv>
	<CAH2-Wz=D4Lru9BkvqaRnFRPDaZbfTOdWcxw13zyG6GVFTtz_vw@mail.gmail.com>
	<CAH2-Wz=Vxsgas35ZzOJJW1ceqp9TJ2DFhKmXULwUAcVpfD73xA@mail.gmail.com>
	<CAH2-Wz=kMg3PNay96cHMT0LFwtxP-cQSRZTZzh1Cixxf8G=zrw@mail.gmail.com>
	<CAH2-WzkFRoTjD9T8ykYDzOMxzGiWFqcAkbK8B=HjfpoMdM4E8A@mail.gmail.com>
	<chsvntdxvsiyigxq4nng36gne4natvxwvsqnkvbjlpaw6bu7co@a6togdo4wbrj>
	<CAH2-Wz=nz-zr=gaXL1od_F7dcr=7d+3jEEveqY-bgcAKF6wZJQ@mail.gmail.com>
	<CAH2-Wz=t3G53xKGYEWqm_QV35ExRgT2k=qhw_VHe5oGjdFRwtA@mail.gmail.com>
	<CAH2-WzkiCK=wELiXPgriN4r7cJzGb3Xg48E9YHrFEyEPTkynOw@mail.gmail.com>
	<s25f6opuqwmz7oad467twvgxc36zmgzguhph43z4sbfkflsjnq@r6cuj7cl36lg>
	<e6avgxqkonquofdstnvt5zq72x6zmolz5vojshk2b3ptsksdmw@2mf4bmp4pank>

On Sat, Apr 4, 2026 at 1:33 AM Andres Freund <[email protected]> wrote:
> static inline bool
> index_scan_batch_loaded(IndexScanDescData *scan, uint8 idx)
> {
>         return (int8) (idx - scan->batchringbuf.headBatch) >= 0 &&
>                 (int8) (idx - scan->batchringbuf.nextBatch) < 0;
> }
>
> once the differences between the values don't fit into an int8 anymore.

The static assertion is incorrect (or not strict enough). It didn't
account for this int8 arithmetic. That'll be fixed in the next
version; the true maximum number of batches is 128 (still more than
anybody is likely to ever need).

> But I'm tired.

Same.

-- 
Peter Geoghegan





view thread (367+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: index prefetching
  In-Reply-To: <CAH2-Wzng2c2RtgENok68XON8i1ypeQteXTmzcQyEjrqecnEd2w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox