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 1w04zd-001bBF-1m for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2026 21:51:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w04zb-006AKt-2k for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2026 21:51:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w04zb-006AKj-1j for pgsql-hackers@lists.postgresql.org; Tue, 10 Mar 2026 21:51:56 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w04za-00000001Vpo-0Ql0 for pgsql-hackers@postgresql.org; Tue, 10 Mar 2026 21:51:55 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5a13f6bcbf4so5848576e87.1 for ; Tue, 10 Mar 2026 14:51:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tigerdata.com; s=google; t=1773179512; x=1773784312; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=e5wl03Jwb3JrGewlIpWc9EZ+aSIPCcvKqf74kEHCsvQ=; b=EUB03y2qLeEe7prwNvnESYRLOa5jeiVMMYPMcUmTpJW+vEr+T9J4I15P/UY++BwjOm DsEUHUaYUc2Pxhci2cKf4nS+Ktfsw2GY+RhCeBkulRP0wc9FC0+3xlxvc7ZZjD+cnOtq A7lgEHP43cU4ZrHchZkFWxuokw2AxxAsYXgKwlm9XqfoAUa3c1dJdENIuQXrab9C+Vq/ Xq0SyI4bO/JgF7YCGwiLuztxBdlMpHEEu2NlDPEoNs7ccMbpdv0ASQc3eUiD02TP4VxF RnO0zuc/SE9DddgF9s9gjlQEDC5oJVhxj5Y2rICzyIAR7goqi+4G279MZ92C+xg0S5ua 8TXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773179512; x=1773784312; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e5wl03Jwb3JrGewlIpWc9EZ+aSIPCcvKqf74kEHCsvQ=; b=dzFPMbu1Xf44jP91BCK6raxUrwJHScT4Fdtszyrg5NNKasCT6LtijcuRDCu7hn+3bI 0Dc8IlFMSjUpztsejPDbetcLxRZteMQZtLmE5ZxbbOb4558fObtxpHwVOuTmfMyeKh3S Ce6kDoQyqoljAqw0IpPRz3NG03zVGZVRNFhcVslAfM7xao7+NJuqMdqgH2eStAODXsx/ 1aRyqwom7q5IKm4C3MSds8MLpkXL5TgaQTO1g1a2gjm/NrZsfciGAgfteWAssi1/QBQh xCNSOnPeATjBzGv474OscGgEDRustFzxZX/vgnwiaGN+Z2RgAUKYKa13qFRbsYe+Rdfb Llwg== X-Forwarded-Encrypted: i=1; AJvYcCXvejoxS3Gk7XJ5JeB0ESq/IZGGVl+s0dNNVm7wUm0Le9UhTNpDo0lLCrIE+us8hTVse5Y5+twOMqNrzRD9@postgresql.org X-Gm-Message-State: AOJu0YxhW5PONvXFCNCqHLpkWLEGBXmico1U7UdeFRNY60KaTug+Nxnh 9Y/+uUJyx4N91OeZHLU71Ly8OpodXZ++231n9WHkJOV6Yz1HXCSaFcasSGgGz420EIM= X-Gm-Gg: ATEYQzzJsQC3KPZcu71bRqbWoLQ2360Rasmln+Teeb1+JvM+fV3+5RnuwZxGbi5OJlY zZuYecOaUDyR1D3L0ozUjn/LuYjfu+rXQ/2TsxhmpT2RHgiRc0gxi05QwX7RsM9Xeiy4XkBk5kd Q0ntYgf/UjmwtcSmRY3cCwiFiFV8xPOhQ3gHrb9i90M3Rh2AywoqdDqMl3/bUvZilz64+9kZoNP VutclQgwew/2UfmuS6TGoNKRwLxIDHEhmGJkXD1Lrw9u+vXqfvE9oSrhmK72Lp0isMVcwqDLQd2 06/l0dtyJxZ075baefKog97fgL4XA+ZIlGjclIIZvkWmagDxvUv9oHQz/ceIY17Mh6lDNPRaUKl CwMetq6s12tBr48q+kjjcQvUacsE4c6HsICPZzKm3F3KSkU39YbpDXspX+TE/J4dhZKAfB96R5+ Nrzb0gbhEc9oxStnkBIXq3rY4AYdnDAIXcpRTJYp/2bnOtCNnVyDgSPYzXtR3Hlg== X-Received: by 2002:ac2:5627:0:b0:5a1:1e11:7532 with SMTP id 2adb3069b0e04-5a156cbd1d1mr31789e87.24.1773179512250; Tue, 10 Mar 2026 14:51:52 -0700 (PDT) Received: from [192.168.1.128] (p4fe08b07.dip0.t-ipconnect.de. [79.224.139.7]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a15636206bsm59114e87.67.2026.03.10.14.51.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Mar 2026 14:51:51 -0700 (PDT) From: Alexander Kuzmenkov X-Google-Original-From: Alexander Kuzmenkov Message-ID: Date: Tue, 10 Mar 2026 22:51:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fix uninitialized xl_running_xacts padding To: Andres Freund , Anthonin Bonnefoy Cc: Bertrand Drouvot , Michael Paquier , Thomas Munro , PostgreSQL Hackers References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 16/02/2026 21:10, Andres Freund wrote: > I don't think it makes a whole lot of sense to tackle this specifically for > xl_running_xacts. Until now we just accepted that WAL insertions can contain > random padding. If we don't want that, we should go around and make sure that > there is no padding (or padding is initialized) for *all* WAL records, > document that as the rule, and remove the relevant valgrind suppressions. That's not random, that's server memory, right? Probably not another Heartbleed, but I'd rather initialize a few locals than find out. Happy to see this being worked on, these uninitialized WAL records are a major obstacle to enabling MemorySanitizer. I ran into this again today and this is how I found this thread. Unfortunately the MemorySanitizer can't even use the same suppressions as Valgrind, because the suppression architecture is different (can only remove the checks from a given function, not all stack traces that have this function like Valgrind does). Best regards Alexander Kuzmenkov TigerData