Re: Orphan page in _bt_split

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Orphan page in _bt_split
Date: 2025-09-02 04:42:30
Message-ID: aLZ1tnOQCRfepByH@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 01, 2025 at 02:35:56PM -0400, Peter Geoghegan wrote:
> I remember that when I worked on what became commit 9b42e71376 back in
> 2019 (which fixed a similar problem caused by the INCLUDE index
> patch), Tom suggested that we do things this way defensively (without
> being specifically aware of the _bt_getbuf hazard). That does seem
> like the best approach.
>
> I'm a little bit worried about the added overhead of allocating an
> extra BLCKSZ buffer for this. I wonder if it would make sense to use
> BLCKSZ arrays of char for both of the temp pages.

Hmm. Yes, the allocation makes me a bit uneasy. Or it would be
possible to just use a PGAlignedBlock here? That's already used in
some code paths for page manipulations, forcing alignment.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2025-09-02 04:54:04 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Previous Message Michael Paquier 2025-09-02 04:27:16 Re: Orphan page in _bt_split