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 1wA2qh-0020qr-2e for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 09:35:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wA2qg-00GLiC-1K for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2026 09:35:54 +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 1wA2qg-00GLhc-0I for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 09:35:54 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wA2qe-000000010a7-1xwb for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2026 09:35:53 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-488ba6366a7so10728555e9.0 for ; Tue, 07 Apr 2026 02:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1775554551; x=1776159351; darn=lists.postgresql.org; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=fwWwz79nscOise8mVJCeRcXHnxBEBmIdM/VILQ0c4BQ=; b=IWuX4FJ0SxDDbmm/UdcNfplkanky2yuhJ5uetiKltjRbYU/kxcssO0Sxiix+QLTdX0 3DQu6OwEKLzD5Hk7BjAcPfIrKuNXGhfBJqGY1exkLtwUBWehyWo+YeOubF+XXYbTdVM6 eZlNFDi1V4bCAy/VMo9R/uyoO5oNlOPFCZYUqLlxKmRkpcxuDtQsB56hXJ7FZQKvUCNi tbXMZhUTSu+izscnItvxhSILlTf3M0PyEH5VNAWAhLnqK1FVhPi5X4iOAoRv/DDjf0ws Ee8q5fbmevY6cNfyK67yGskTp7Aa/0aRbhNyMb1WHbtG12TFAHCQT9g7McfniplV9EWh A/FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775554551; x=1776159351; h=message-id:date:content-transfer-encoding:content-id:mime-version :comments:references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fwWwz79nscOise8mVJCeRcXHnxBEBmIdM/VILQ0c4BQ=; b=L6AqmseBWzGa2R+PUmjAvDF7a2DdWkDo+YUR8ntOCYLeb/akU+rNwfec1+R+onni2A l8TDEjtgg/3npI6bXl7XqnS+UahYOja4UG5bFfmYEO4ld5UN4jNQHdusQ4TZEPqjYXmI 6yDpCxyvU97SheTXVtXIAohCr32jn56u6fJxg9LShgdAtTQAa7RD30Ws4QqmktEZpeoJ ZWBETa/hB2/qJRqj3NERewCpzPy9GCtjjDer5xIbn6KPynY3LGa0K2cH2YnWoUEJyFch 54F6WxO/sIZ3poiNQuoebpr1hYMbVC5Ir+mfuqi3APVq/WXLt3HX2qam2+c2HedJPy1z 4dfQ== X-Forwarded-Encrypted: i=1; AJvYcCWv3xXk0Bq3qcEYqZIU8zqeKu2AMXz1Rubp2N9nDYYPXo4uN8D6kWJFcizVnbRdQGRHq/OefeCT8kR2xgX6@lists.postgresql.org X-Gm-Message-State: AOJu0YyyNNB+YBb57AwtZbm6gmGcUi5IgL2IKG+FseKyNOcJKSXov7UA KiixD2vU4TrMeC5oq2PaJbR5nxmuyGQ+6vK/JPdyR6StPN9XYLtqc58qS3HV1M3k0vk= X-Gm-Gg: AeBDietLfvEuTn1O0g2keumBK9w4ZzuA18zrgsEV+plLwSS8x0h8ikGGfntWaybxA9h iDvKwr6oWF+nzBD//KBz5mwKzwZ3nYVDjZ16HGD5YkJyhJ4fiZW1xAVHblxhi9BK6Tfj2d0k/AP 75BLFT3escQ68PJZlJyv1vVm+N+zXfx10T6/m5llEw3OSZlGTrjaFkecjlu9Cno1jX7ABRhr5Hd nmpBbZdP4OzaI5IKQ/pNNqcNovsabzIekS3IoRG84SyAx7S9rH5IRwNZ0Kbengfwt2/QJ0aLnN7 yGcd7C02XoU2YUseN+pjqhZKRqlcP1EvlXFEunJDkMFtwWL4ZuP6B1n2o5IargzmDk5xL9/N4LM eouOZ4RI2/nR+yp7NGjy4cyxkXyyzcSm8N32PBLF1W62aPMBcvcsAvdFZAJI4GdbLMY6u13j7U2 9yzXEPShmy/91+4CF/5nUQEqyVxdeLznfx67pM X-Received: by 2002:a05:600c:c089:b0:488:b0a1:3cd9 with SMTP id 5b1f17b1804b1-488b0a14060mr74968315e9.16.1775554551225; Tue, 07 Apr 2026 02:35:51 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4888a706062sm474717935e9.9.2026.04.07.02.35.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2026 02:35:50 -0700 (PDT) From: Antonin Houska To: Alvaro Herrera cc: Srinath Reddy Sadipiralla , Tom Lane , Andres Freund , Noah Misch , vignesh C , Amit Kapila , Mihail Nikalayeu , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: <202604070916.5rj6kvjx3mrk@alvherre.pgsql> References: <202604070916.5rj6kvjx3mrk@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 07 Apr 2026 11:22:18 +0200." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <193023.1775554550.1@localhost> Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Apr 2026 11:35:50 +0200 Message-ID: <193024.1775554550@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera wrote: > On 2026-Apr-07, Antonin Houska wrote: > = > > I haven't thought of this explanation because BufFileWrite() only copi= es the > > data to a buffer in the BufFile structure and BufFileDumpBuffer() writ= es the > > buffer. Maybe valgrind is able to track the copying? > = > Yeah, apparently it keeps track of tainted bytes somehow. Clever. > = > The change to palloc0() that I was proposing did not fix the problem, > because the stack allocated struct overwrote those zeroes with the > uninitialized padding bytes. > = > I ended up with an equivalent fix to Srinath's -- zero-initializing > the stack-allocated struct, so that the bytes that end up copied by > memcpy() are all defined. Srinath confirmed that in his environment the > valgrind failure goes away, so I think we're good. Thanks! -- = Antonin Houska Web: https://www.cybertec-postgresql.com