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.98.2) (envelope-from ) id 1xPF7s-00000000Yj8-1CxY for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Nov 2026 08:16:45 +0000 Received: from localhost ([127.0.0.1]:35936 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xPF7s-0000000Gfdz-2syi for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Nov 2026 08:16:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:39670) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xPF7s-0000000Gfdr-1pE5 for pgsql-bugs@lists.postgresql.org; Fri, 06 Nov 2026 08:16:44 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xPF7p-00000000WVT-24TY for pgsql-bugs@lists.postgresql.org; Fri, 06 Nov 2026 08:16:43 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id E52C67A00EA for ; Fri, 6 Nov 2026 03:16:41 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 06 Nov 2026 03:16:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1793953001; x=1794039401; bh=CV8O/YRmbT 9deV669OlP+gPzeAWJEEXOMXZmL13s+Bs=; b=ltz4R0sircgG1KI6dIdYLzILkY Vvm7UHkvxTnCrqbE8l1TmMRz6zM3UZnH8gErHItMMceB2R6Tt3M462MpGv1K8Dep tWsk6IpG3WDbfVRuCLc1QgBn2i+WJlHYOzsnKzHmYtBbES5SzfOoMAnZwH3BwpSL sKIBx7j6/ElRL3ga4p+TOt9+PL5vYVkeO2TsjQ8k3fH82YzKmJabjNxyjfNSyE0d siArfug7Vgt3vdx3alKE5PHRbuYaJMXSvppXzSbec46AGamjWu+Srxo1aXj3Gu9J hW9j0CqaUB1NAk+Gpse5mVaqk8hTYd7DsUrFGqEXDwaa7ALQxU33vOjgISoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1793953001; x=1794039401; bh=CV8O/YRmbT9deV669OlP+gPzeAWJEEXOMXZ mL13s+Bs=; b=1hgyFJ/ffhACiaqq/qs/zSQ1vMue6F09Mv2Mo7432qs3QsRF7ZZ h0AQKihc5jIdoBiW1VzM80OJR6khpR3LIKULvjM+fanEeG5FrpL5WXNbeYnVNOG8 z43DnuNvNmYuX0MXR/EMLq+iTpe84jEUZO4V9+b9xfAj3p+SL6c9teLjTaNwkp2a AprJNjP2YiVY3kGkfuyjRexzfMkyltclU7Ot28cAdSGbPzrCMnotB19RVqtKTuC6 rPeK8n7IReFMb+4TpEjZsiw/EnGI2PovqpLrZEDLzOb0GcZTznif3RLmcKB81YrW R1Alhw4EoFqnR7cHH8/I3Lo0NVYdd5cvm1A== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=paquier.xyz a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1793953001; d=paquier.xyz; mf=PG1pY2hhZWxAcGFxdWllci54eXo+; rt=PHBnc3FsLWJ1Z3NAbGlzdHMucG9zdGdyZXNxbC5vcmc+; s=fm3:rsa-sha256:cYXALZf6b8Hyslj/YZxJYwdAcJvG5L+yIMTpSiPDFH9HcdP yzwmyUr9i3kAXljXCncG/wIse8l2FmMkEZTf+zgnusqgizJIe2jyPYDoxwIZPtKV VAhKx59Km6XV9t8PiPEwD+CjUCUetOdTLcHGX5hERMToFtw/cQbE1xWv4sUVcpdX mlfF+7iOc1zqFGUAfC6+KAdmwavB7sSi+6akF9C8jsWuWMCQ3C78qAbzl0yvxyxO j8CoAo1ErVRwAn0hMRz9PecJ264lSnziu6s0m5HQsHeYNRC/3MpJkXPEEpAdFQDL 2O0cklNXuHA3CCI5gjCjspegJcPny/BH3R8bhLA==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:oeDoeBXB3d+Y/6gzESw6j8v7rv/glfRkGNpykjkxQR8=:C8BHQQHp2JRG81IqQtQZsAOEouJu+m38OGEGYsb+WXk=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFIQeYbExbPJukDbxUkxmPRjKZIEyh1zLHfiN4RenynX4YOJvP6gXv0gPtS+y8xSA Gql88zATfgBAXsYNmM6XTTWTc1pAsImQApZP6aVicY/FP3bxS48pwig6zOzRYCgumsZbOC 9hnvZohYmOwbZztjDDoY9/STbAllQyWOPFEK+1MES7mWJVuvIFLWtFvG+FhWAbJMp6AAuw JUhvOvj/QaXYtChf3hxuY1h/6Uemg2H6MnSec5HIBV3lDniq/RmoksUNoNHJOtpVhrx6vw Im3uHrq6Bfjs09+GFMx7M8UwylUJMp0+Dkh3/AQoxAhkSXA6LunNlG5CqNjdulhxM8cata 2DgrapuSqANCGwxFEE6YtiIkF8f1cZsfMu55edaAYvTKjjM5XBk0z8cIVKHX/krcApnfYB WuHERPJSGI4JLvxulILlNqw4u4epas+yiDaAtaszsIHOxEyZ8UHH3z3K0df5/xpdwVbWir 1GyIHD07LcHY6Tiz54lkupAjVQV49EDhn408foOOTlSdF80bxItV4Hgyr9UUFvNXx+aV+l OYrBSQoBZcxr9y1Z50WwO1GAws3QcHSdVpb6jKWepvMDC3Nfm2GFD+V+0L6q70eLF86D54 iXq5TD50+v3UXHnVuOhZnrxcvLeRJEMdyMsenphp29w7GJYAPNc0H/ZhPv5Q X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 6 Nov 2026 03:16:40 -0500 (EST) Date: Fri, 6 Nov 2026 17:16:37 +0900 From: Michael Paquier To: shihao zhong Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19780: gtsvector_picksplit() reads uninitialized data when called with three entries Message-ID: References: <19780-93fb5c0e4ec2af18@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fIiSd56bEI1O+V+R" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --fIiSd56bEI1O+V+R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 06, 2026 at 04:52:21PM +0900, Michael Paquier wrote: > So the problem is this one, where we could try to read the cached data > for seed_2 but it's just not initialized yet: > datum_r =3D gtsvector_alloc(SIGNKEY | (cache[seed_2].allistrue ? > ALLISTRUE : 0), siglen, cache[seed_2].sign); >=20 > Calling fillcache() earlier so as datum_r and datum_l are built from > correct values is enough. Your change makes sense. +INSERT INTO test_tsvector_wide + SELECT 'foo', decode(string_agg(md5(g::text), ''), 'hex') + FROM generate_series(1, 300) g; By the way, this test is going to piss buildfarm members that have FIPS enabled, where md5() calls fail. Could it be possible to write a test that's more portable across the board? There is a v19 RC2 in sight, and it's already late in the week here so this will have to wait until the tag of the next version is pushed around next Wednesday. It's an old issue, so a few more days will not matter. There is a fipshash() in test_setup.sql, written for portability, but perhaps we can make the test much faster by using the same tricks as test_decoding's toast.sql in terms of generation of long values? -- Michael --fIiSd56bEI1O+V+R Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmrtjOUACgkQnvQgOdby QH17axAAh0gRMF/zDbD1MQwwWwrgpTduxtTTtwGOsMKx1fZcpSsJGEmqx43flk7e Avg5SHtY2az+awnOYS5ryRuOIA6u1bTWrecYmxstxvAIMlmu8iYBUSCtHwG2Sdj9 +ozbUm6WAMLOwd5s426dNyaa/FYGPMkWEQJVbcGhgnnkg1gES5AqQU6hc5h9P9wD vN9e0zEItZy1mjQWRVzXWoSF2d13s1BO90AV1PJU4kHTY9QF7YRwTG2R6bpJ+0UG +DyrRHagVH/uDbgFPyeVwEW+tVoDBoLhVIrKJuyQ3dbmo4kXAeX2k+yv/V4lFXzE 1KYwdtBf9q46tZ8JQLPvvR3F5AgH2vlzl8CE3b+sdktxb2Uo2Q8EotFM4QIsEXMC Q1qyXqYkkRLeg/KWVzC3Z5PQNaMbHavVYiRtB4JPHTdiZlnW0hGjSyxD2VypCBAr KsqnSLKzgkQVTQeVuwClruXllNfRriTUWRfmCraf7YX3T2glmXweKKLX30Dk3Eqt iSoDkjpAKhVu6wvS1MEBTWex4O7mDMMqXV29d9vHqxWvJKZZg+u1BAyjaTfjwaQL UFm3QYgrqgCjxdDFIdprIm69V80KlKpDbkT5zaBR6KXkby7ohqiKiHvEEL4Jk9GE RxNzAcUQrxm/AP5PrvTEMlPWvfIVMG9APALsXp6aN6hnCvcDv7M= =aI6C -----END PGP SIGNATURE----- --fIiSd56bEI1O+V+R--