Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBsTi-006g0f-H9 for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Nov 2024 09:18:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tBsTf-008bZD-Ko for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Nov 2024 09:18:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBsTf-008bZ4-Az for pgsql-hackers@lists.postgresql.org; Fri, 15 Nov 2024 09:18:55 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tBsTc-0022uF-5y for pgsql-hackers@postgresql.org; Fri, 15 Nov 2024 09:18:55 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-37ed7eb07a4so315265f8f.2 for ; Fri, 15 Nov 2024 01:18:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731662332; x=1732267132; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=UvqLh51eWrDt0GJnjwgaMe9TIT2kZ0i5sw0CE8UW/VU=; b=G3f1PwBK1RfKzNkkahIPSST8Yp1FQmyFc6UZ6TX29K4iIJvDqbef2AJM3/w1w/SDak qGGmd4E8nk4/zYWkaFeyywFZXXp6ue2jxs87j+qwvCRuS7VrenqUEgDXioWEDRyGDxok kcLjq/48eEnJuc8XOcJEflYqywFB2WjadJ9IuiiLUcLXDSR5ijhg8V0hmnMElRiEXJWi b29rsXVAC96HlJoxLX5JU9ftiz7+2qRAjtbWQ3SjglMGdJLoO7Cfd0dvuFZOSQjsjxAP 5cY23HWp2LoVvcmRyttHyZxX1ld2QFK9sCF8PZY1Ayw0PItF/OtGuZaEcU504xF2azP2 lqzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731662332; x=1732267132; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UvqLh51eWrDt0GJnjwgaMe9TIT2kZ0i5sw0CE8UW/VU=; b=KDgfm3YiHLDUGQm1rbEI6HLBeV72YKKduUrGrREGMsEH+ZfYqkznqw2xHtWigGLNZy ZQCCN+FXih8mkjspkZw4g+2/7Ep8s8XY60VeVwNh62isnQ/dFJkAHA9Vb4pUAE8NbWQN FqTiA1PoiBudKwYr14mrcWCcwoqImvmBVbEZ6ZiuXEroFnryv0hfZ19DbIsRkHDVliAs RwyRpC2nsPpfWqPHA1HcDZngnraEV4skPUkK7KFv0QsxfH+u2aY0kKWtOkphqHb+BZmh DrNaxHs25ngwZ7Xy6QOXbIYAMwUkoh++bnWXdcR2/1fIS1EUtDoY5KQiFiV8dwN8wzv4 JoJg== X-Forwarded-Encrypted: i=1; AJvYcCWeqIII0ZMrrSVZXQy3kGOZyrhgRnQpPGbcvdQE12NT86UmfA/xHKCBlpRBfl3OvyjoscI3sH8ncTX4tmsp@postgresql.org X-Gm-Message-State: AOJu0YyllUDx5kiuyOrVhOe0f8v+E7HdcKA9e32yE1hXILD4ZJnwTcwp UxVIkrXQc92uQsxBiKttzNVYcmcABmTgCcwu0++H5SYshSI5kdaB X-Google-Smtp-Source: AGHT+IExxMHoyVM0bfG/gGZnnwRaZXLByG9ut4yoG36zeS1/nBy7/8ZgUNjETWb3aq0WBhaUo73o/Q== X-Received: by 2002:a05:6000:a0a:b0:381:f443:21bf with SMTP id ffacd0b85a97d-38225901b26mr1369124f8f.2.1731662331807; Fri, 15 Nov 2024 01:18:51 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-236-134-5.eu-west-3.compute.amazonaws.com. [15.236.134.5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3821ae16108sm3826988f8f.66.2024.11.15.01.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2024 01:18:51 -0800 (PST) Date: Fri, 15 Nov 2024 09:18:50 +0000 From: Bertrand Drouvot To: Peter Geoghegan Cc: Alvaro Herrera , Pavan Deolasee , pgsql-hackers , Noah Misch , Tom Lane Subject: Re: Potential ABI breakage in upcoming minor releases Message-ID: References: <202411141629.3eavaz67xbmy@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Nov 14, 2024 at 11:35:25AM -0500, Peter Geoghegan wrote: > On Thu, Nov 14, 2024 at 11:29 AM Alvaro Herrera 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? Do you mean in [1] (Maintaining ABI compatibility while backpatching section)? If so, it looks like it's not currently mentioned. What about? " You cannot modify any struct definition in src/include/*. If any new members must be added to a struct, put them in the padding holes (if any) in backbranches (or at the end of the struct if there is no padding holes available). " Also we may need a decision table to ensure 32-bit portability based on the hole size on 64-bit, something like? 64-bit hole size | use on 32-bit? -----------------|--------------- <=3 bytes | safe to use 4 bytes | don't use 5-7 bytes | use first (hole_size - 4) bytes only Does that make sense? Regards, [1]: https://wiki.postgresql.org/wiki/Committing_checklist -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com