Re: Potential ABI breakage in upcoming minor releases - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Potential ABI breakage in upcoming minor releases
Date
Msg-id CAH2-Wz=RAaAmY_myKZJkk3r0ms6msWgdpt0DT1vQHtq3O8QMxA@mail.gmail.com
Whole thread Raw
In response to Re: Potential ABI breakage in upcoming minor releases  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Potential ABI breakage in upcoming minor releases
List pgsql-hackers
On Thu, Nov 14, 2024 at 11:29 AM Alvaro Herrera <alvherre@alvh.no-ip.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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Potential ABI breakage in upcoming minor releases
Next
From: Noah Misch
Date:
Subject: Re: Potential ABI breakage in upcoming minor releases