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 1vrliP-00522J-1i for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Feb 2026 23:39:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vrliO-002mb6-1Z for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Feb 2026 23:39:48 +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 1vrliO-002may-0a for pgsql-hackers@lists.postgresql.org; Sun, 15 Feb 2026 23:39:48 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vrliL-00000000nh4-0wNR for pgsql-hackers@postgresql.org; Sun, 15 Feb 2026 23:39:47 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2ad21f437eeso8618975ad.0 for ; Sun, 15 Feb 2026 15:39:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771198785; x=1771803585; darn=postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EFdp9mEcg3NkeRwbM2bwsonL1nf97ddRrqTsNwUrAHo=; b=nOypGwevhJW/5a1x3+srlc5VkjkdfOzLmdBvik34l36zPVnrHXCnQ4hgCzXNLH2cKm rR7YeNwALmuHv4Or5vVEHGoWFRxV+b+y8rdUnOmh/4aNzWrNBcuvQxh3N+LAeuE6E/pN oZ4zQ+aQHlEDhmpKPofpEbvuSLSxF0vWLKxnP1WyfMZAOzLTmn4pqWWXYVqeg4LalCa8 k+oOkFSoKZLgSOHUozD4rHN25a1TN/A+4xHnOoI3cyNzrLjGUVaQNvtmUoS2eZseNaxr GVv7MyZ5DfsMF25MY4mDA4mhrMc2kMxPPuTTN+Yl4vnpasjAFkMR9hdtcPLyUCBr04OH oJ2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771198785; x=1771803585; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=EFdp9mEcg3NkeRwbM2bwsonL1nf97ddRrqTsNwUrAHo=; b=ReQ1u2fu5gY4mjQ7/ghgP/IIHUP9W9hGl3J46I1xSFjm+h2Hwyu/scBttIwictFpdo F6wdhYfXZu0Xup/h+dUYabCTbMWWCFrKrff0jFkdBA/zlD8DPnD40x75f6n4XtIdTYUr jiqdDZmQpHu59U9lGbyuoCHLkWz5Z28F51McJb7ThnBlINq7bN4p3gJvmuLSf9FGYIam 0vW3TCvG6NupPaeh2uZyMfsQWN5JkzOtHVeaQB5M79CVWNDb78QuxyGeqkRbuTb6Y5YK meseCaAE2mwUiYoHTRlrp6WOr/vUHxAMPsLMQBxfvLSYRqHEJqoHb6inJuqYxxfQZc0k q79Q== X-Forwarded-Encrypted: i=1; AJvYcCVMly5lhDbQ96IHM3dAUrY1cnVMF1OSV4kfMQ/XEMBv4pBwBy+IrcUXJzVQ10TXWAmYeCEBS9jKdG/IJ/L7@postgresql.org X-Gm-Message-State: AOJu0Yz21mq/E6S0gd5/0dLOQX55VWE+t4ITUG1BvXRckz6/180ocTq2 5NJdSzQ98k5P2kQfJkocvJjMKAn4Y9uwp/Cro4PKjes8mFvpMf81mtdN X-Gm-Gg: AZuq6aIE2QdSYks3zL+dVDJMMaora0UeRrE1ZWf+5monuVyI3SG8GHFyxcB+8Q1a3Tf MTA2ZPi+IU/gkCgEY7jeqoaRZCkRt6h+yfi1JOstSlsS/K/lqAnG5LL9/PiJBcl0Ls9cO3YF4bb S6wqxcM/dDb25EJuJp+ETW8eysujlxeOkD/ybC36P8/J9PPQ+MrskYRFnw5erDB8kd4W/yPa7da 0Bdw5E6xFP/jOc3kDeyKZtRRJMJ/CnOLnGYOuAfZP9urOiZlQ34B/UjUj5HWNbLHDIVgQr86s4A 2knxwK754B1lwtL2Mp/FRaPWC9ILLkewIjOh+h+hHs3PT4otzqvvQ4nd7J5EBr8YdGMVcgNDtlI TZ68CMsOybLVjkxmdMe79te+yG3nVmbrdmLn2WUzoMme9QWsZuwu0cGn3QtmI2EYlMkDMVUNgsa VV6CI2zLV+WYV+PCHeeD1R+YP3o09+nUo= X-Received: by 2002:a17:902:ccca:b0:2a3:e7d3:810b with SMTP id d9443c01a7336-2ac974546fcmr76962545ad.12.1771198785066; Sun, 15 Feb 2026 15:39:45 -0800 (PST) Received: from smtpclient.apple ([203.76.245.26]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1a741e5bsm49288785ad.40.2026.02.15.15.39.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Feb 2026 15:39:44 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: Fix uninitialized xl_running_xacts padding From: Chao Li In-Reply-To: Date: Mon, 16 Feb 2026 07:39:09 +0800 Cc: Michael Paquier , Anthonin Bonnefoy , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <4AECB8A0-A04A-4CE5-9161-B8C28799D4CB@gmail.com> References: To: Bertrand Drouvot X-Mailer: Apple Mail (2.3864.300.41.1.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Feb 13, 2026, at 18:08, Bertrand Drouvot = wrote: >=20 > Hi, >=20 > On Fri, Feb 13, 2026 at 06:50:08PM +0900, Michael Paquier wrote: >> On Fri, Feb 13, 2026 at 10:39:14AM +0100, Anthonin Bonnefoy wrote: >>> The 3 bytes of padding after subxid_overflow were left = uninitialized, >>> leading to the random 'ca ce 9b' data being written in the WAL. The >>> attached patch fixes the issue by zeroing the xl_running_xacts >>> structure in LogCurrentRunningXacts using MemSet. >>=20 >> This uninitialized padding exists for as long as this code exists, >> down to efc16ea52067. No objection here to clean up that on HEAD. >=20 > It's not as important as when a struct which is used as an hash key = has padding > bytes uninitialized (and byte comparisons are done on the key) but I'm = also > +1 to make it "cleaner". >=20 > Regards, >=20 > --=20 > Bertrand Drouvot > PostgreSQL Contributors Team > RDS Open Source Databases > Amazon Web Services: https://aws.amazon.com >=20 I have no objection on cleanup the padding bytes. As the structure is = small, maybe we can use {0} initializer: ``` xl_running_xacts xlrec =3D {0}; ``` That will allow compilers to optimize the initialization. Anyway, = that=E2=80=99s not a big deal, no strong opinion here. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/