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.96) (envelope-from ) id 1w2Tle-000KGG-16 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 12:43:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2Tlb-001GN5-33 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2026 12:43:23 +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.96) (envelope-from ) id 1w2Tlb-001GMx-27 for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2026 12:43:23 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2TlZ-00000000bSC-00r5 for pgsql-hackers@postgresql.org; Tue, 17 Mar 2026 12:43:23 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4852afd42ceso49117315e9.2 for ; Tue, 17 Mar 2026 05:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773751400; x=1774356200; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=eZkeRymYzl3HfHGcrHXlLMME6tZsJwKZODZT2yYHh4Y=; b=cOw8qLyWb+1MnzuNYd14ELuaCrfu2nZvLIKr6HY0SohrCPlkoCiu7YweoNM3/nd8Jx /2tYU4K4G+AZwlV8pJQv9XAWgo7pdklVQQZu+1EnTjQa8zJbcIUGS95AwNAy357hzL6N FFi5VKAJeNlGfU/7CYFDOG8rjNnt9OpgYpl5MT0lWsKj98oKBu96e8Vbm1zUdh/Eyysk 5AXqQc8XMXMBRYyM6cYbC0+/d9Fk7+iYoO6+rzd3dMlgiYUnkNSJoL9hliWDYevEB8y6 WbBhkrMfE1/CVcLmG+W7k/jg5/OUUIBlHNO5iU1cMuuReLfLvGaagi3kPH+GgV8qbSbQ j1sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773751400; x=1774356200; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eZkeRymYzl3HfHGcrHXlLMME6tZsJwKZODZT2yYHh4Y=; b=PzI0GAQTE5TGnEIDeztohXRZ+u6+hmK4mBVPLovBmwMn03INGJxm2uqw5kYfli1WIY vwhC4AhAlQVNIKiUvig7Dn+pe4RFjCSJuGZkKPYoqmCbtdw1OW4SmbIElpFZXqj8ROeq YMk6d3hTFGZFK6TW9AHx9lGXGL/drlNwT2mh8aH/efinzoz8Mo7FFF5nw1qUOS/6ea+q 2Ph3wtlcpXuJxx3GZpWs0vjGoQmNCK2+1vaYPyw3dazzXmdBu3DzN3xalK/xPC/JB6zh 9+oZvlG7xPymyDEjc3D9s4QHWjF4TaIwMpEs/OJ/8J3ePmwUSmoj/xXhjai1b1Te7Ahz Teog== X-Forwarded-Encrypted: i=1; AJvYcCXw5H/nmogBSPfNPoaV/SG3S6OANnd2JwElV4r1qYPAN/9jahs9/g5feb4wNLeJl7KmKJdr6Lbj/iL3H5fO@postgresql.org X-Gm-Message-State: AOJu0YyxFYwDp7mDdgW/hVDeW8T7g6v+42MHavEaxAYsmzrU9AsDQetH MXpzhEO4DbiJH2Ke/n5gsZy+XFp7XsNgYB1oLoZ5aAswQA+K95sfZsY+ X-Gm-Gg: ATEYQzw9VJh5sMb01W/9GASJK7+pYp8kKo3g6aVPJ1szGnNr/P3QklpubiSOwYlz3xs TG2yN8lfmiIz1yschPOaqDLi/guXT2IEVJoWY14vdvnPWux/exEubCKa6V0wJ+8SBXNZKvYZRSl H0TwGPiYxplA29hHO7J0OZAAAIktzbfN17RrdhkzsbSrjSqIiaHB2J+zsvAeAXRFXbGYW3c5HcS BhgtknfiBGJVX+r49jNlbAo5/mIabPlZGcS+jSEuRctx49NfPc77DEObbHVh5Hi/dFYtFl5yWJO SSJD5NbJuKMSQmqesfTyehtqnR3HK5VEMmc6ttOCkkLuEc/8F0YW6BoA6JyAjrgAchUSgakhlbF xsbXBCcezk6B61gjbnWak7CUbP71L4Y8UZOAM0RoVvOm/nlrEaeTIUU09/ngPhJ09gmGJutocTG 8Wcxdk/0w6gV8pyH9lwfAjikSU7ErTYQLZkaUTZthZKdEQcjY1Nkf62StAYnZBAYNp7jQopsQHq QsA3iZH+86pxZ7qCeaGseBAr7s4AzoLoA7I2LwChbIH7yYqfsTOddycJQ== X-Received: by 2002:a05:600d:844f:10b0:485:40fd:8390 with SMTP id 5b1f17b1804b1-485567029cdmr214168025e9.26.1773751399941; Tue, 17 Mar 2026 05:43:19 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4857f49d327sm16385925e9.11.2026.03.17.05.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2026 05:43:19 -0700 (PDT) Date: Tue, 17 Mar 2026 12:43:18 +0000 From: Bertrand Drouvot To: Alexander Kuzmenkov Cc: Heikki Linnakangas , Andres Freund , Anthonin Bonnefoy , Michael Paquier , Thomas Munro , PostgreSQL Hackers Subject: Re: Fix uninitialized xl_running_xacts padding Message-ID: References: <70674869-2829-4b06-ab93-2f82ea51578c@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Mon, Mar 16, 2026 at 05:14:10PM +0100, Alexander Kuzmenkov wrote: > I have removed the unnecessary memsets (for structs with no padding). With > these changes, and removing the two WAL-related suppressions, the make > installcheck under Valgrind passes. Thanks for the patch! Without the memset part of the patch, I got valgrind's things like: 214 heap_multi_insert (heapam.c:2425) 149 heap_inplace_update_and_unlock (heapam.c:6592) 5 palloc (mcxt.c:1411) 3 _bt_getroot (nbtpage.c:348) 2 log_heap_prune_and_freeze (pruneheap.c:2171) 2 LogCurrentRunningXacts (standby.c:1356) 1 vacuumRedirectAndPlaceholder (spgvacuum.c:495) 1 _bt_set_cleanup_info (nbtpage.c:234) 1 ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3) and none with the patch applied. So the proposed changes look good to me. One comment regarding the new memset(s) in the patch, I wonder if we should: 1/ Add a comment on top of them explaining why we are doing this and why we don't use {0} (cf. Andres's point about C23 up-thread) or 2/ Create a new macro, say INITIALIZE_PADDING or such with the comment on top of it. That way, we could do things like: + INITIALIZE_PADDING(xlrec); instead of + memset(&xlrec, 0, sizeof(xlrec)); I think that it would make the intent more clear and we could switch to {0} in a single place (if we feel the need) once C23 is required. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com