Re: BTMaxItemSize seems to be subtly incorrect

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BTMaxItemSize seems to be subtly incorrect
Date: 2022-08-05 17:13:41
Message-ID: CAH2-Wznh0mpBYs12OD_GANaCYGg3dLYruavp917TL2W9c5AP8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 4, 2022 at 10:40 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> This very likely has something to do with the way nbtdedup.c uses
> BTMaxItemSize(), which apparently won't work on these 32-bit systems
> now.

Update: I discovered that I can get the regression tests to fail (even
on mainstream 64-bit platforms) by MAXALIGN()'ing the expression that
we assign to state->maxpostingsize at the top of _bt_dedup_pass().
This is surprising; it contradicts existing comments that explain that
the existing max is 1/6 of a page by choice, to get better space
utilization than the more natural cap of 1/3 of a page. It now looks
like that might have actually been strictly necessary, all along.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-08-05 17:38:38 Re: annoyance with .git-blame-ignore-revs
Previous Message Alvaro Herrera 2022-08-05 16:10:43 Re: pgsql: BRIN: mask BRIN_EVACUATE_PAGE for WAL consistency checking