Re: Potential ABI breakage in upcoming minor releases

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Potential ABI breakage in upcoming minor releases
Date: 2024-11-14 16:35:25
Message-ID: CAH2-Wz=RAaAmY_myKZJkk3r0ms6msWgdpt0DT1vQHtq3O8QMxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 14, 2024 at 11:29 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> ISTM that we have spare bytes where we could place that boolean without
> breaking ABI. In x86_64 there's a couple of 4-byte holes, but those
> won't be there on x86, so not great candidates. Fortunately there are
> 3-byte and 7-byte holes also, which we can use safely. We can move the
> new boolean to those location.

Wasn't this part of the official guidelines? I've been doing this all
along (e.g., in commit 3fa81b62e0).

> The holes are different in each branch unfortunately.

Yeah, that'd make it a bit more complicated, but still doable. It
would be necessary to place the same field in seemingly random
locations on each backbranch.

FWIW recent versions of clangd will show me information about field
padding in struct annotations. I don't even have to run pahole.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2024-11-14 16:36:32 Re: Potential ABI breakage in upcoming minor releases
Previous Message Alvaro Herrera 2024-11-14 16:29:34 Re: Potential ABI breakage in upcoming minor releases