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.94.2) (envelope-from ) id 1stz73-003Dc6-LP for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Sep 2024 00:45:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1stz72-00H8VE-MO for pgsql-bugs@arkaria.postgresql.org; Fri, 27 Sep 2024 00:45:36 +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.94.2) (envelope-from ) id 1stz71-00H8V6-VL for pgsql-bugs@lists.postgresql.org; Fri, 27 Sep 2024 00:45:36 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1stz6x-001H6U-Qo for pgsql-bugs@lists.postgresql.org; Fri, 27 Sep 2024 00:45:35 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 8216011400C5; Thu, 26 Sep 2024 20:45:31 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 26 Sep 2024 20:45:31 -0400 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=fm2; t=1727397931; x=1727484331; bh=gSok/FOA5u b1rA6Rb+wQwuNv+uPwPrs4gst1qBF042A=; b=KpvPJQd80sB4mXM8ODUDlJ6GLU 3TmIxPe/KDK3Gxy+Ryni1l3TV/BIgcMEgYxQNdhGO+ptzpNc8DYf5LksYPKnM0UJ qfTrwqDDhTR0LT6lc8xrz4kTBZDodX0Zctfb82nrhAIK0kYtBWF2kKqjA4aoGtq3 BrfwVQWklKaQpsUr3wsuQCJqfp6JzJjFd+UxhlCt1bHHX+ANnbnF4l/3sb/gqtdS n4ivbsLpFeQ1ntGIsLrB2T5aTNM5PXxwe2B+TVcMd2rf4A+0XZpDejnn7OMcsg/8 EEkN8HG9ttljdJfKmi8Wlf9or9eyxYrtZZQZnR58hXPRcCZwtg0w/gUkkEKw== 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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1727397931; x=1727484331; bh=gSok/FOA5ub1rA6Rb+wQwuNv+uPw Prs4gst1qBF042A=; b=fKvW+4FTfhb29+E1CZzjDUBodiKlLMAfN/CtvaGNnYcu cGsDacRUv0VwyZxvWRSWhkgfC7VAiFTAdYsboxCyUlkhsgob9GPmUv1c7SCp7DM7 Nh+u0lmZ4/1+l3e1H8have6PiLaADT+JwqNlORaNYKM/Dub+WFPdFAXg2gMN30c5 8FC5tI7x9clug38DQtXXepxC5T8HWbxUq50/y8gyqyKxONt9ZS7KSXiv3h/xLAbH R7Ibf4RWDg5ca69KeaCgjmW5PznJha+wFHE3/VfDlsgNPsfuAn3UMPWjn7u1mWzR mJ1PhQU09OT5eAKCWSL4dMzn7yAp41NG82giBAYaxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddtkedgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhf gggtuggjsehgtdorredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepffdu leehgefhkeefgfeftdfhkedutddvhfdukeeggeehieekffelhfelkeehteefnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepthhnughrfigrnhhgsehgmhgrihhlrdgtohhmpdhrtghpthhtohep vgigtghluhhsihhonhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdgsuh hgsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Sep 2024 20:45:29 -0400 (EDT) Date: Fri, 27 Sep 2024 09:45:12 +0900 From: Michael Paquier To: Tender Wang Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18630: Incorrect memory access inside ReindexIsProcessingIndex() on VACUUM Message-ID: References: <18630-9aed99c38830657d@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aS7z2X+/JxBI+qpM" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --aS7z2X+/JxBI+qpM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 26, 2024 at 03:24:25PM +0800, Tender Wang wrote: > Agree. The attached patch LGTM. I have fixed this issue and backpatched it all the way down for now. One thing that we still lack is a set of reliable tests. This can be achieved with injection points, and that's much broader than only this thread. I'd like to get the coverage with two types of tests, roughly: - Isolation, with waits across the steps of REINDEX CONCURRENTLY, and some concurrent operation. This thread used one. - SQL tests, where we could force errors in some code paths to get an incorrect state. Putting ourselves in a corner where there is an invalid toast index is just one state. CIC with a UNIQUE index gives this possibility, but this just works for a "new" index, for early stages of REINDEX CONCURRENTLY. -- Michael --aS7z2X+/JxBI+qpM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmb2ABgACgkQnvQgOdby QH1HRg//SBPNZxfMb0BcC7N/oMIJVq408hnqM7RVV2ACHp46eWX+GEsIgAbWqReP Q/e2l5P7dTyYUgKzMYmF0Xc8GjqWk4Akx1ivHcdWHvsXYdXTgwoaTo1u4+eSnJi8 lHzQJ6ST21ogKwhdQtuXCeSYWsuYXjKr03HGSJLz3ybuB2HbFqzsBtFZh2U9IF+0 POrGvY01UDSfAf/+Cb7bvPNTtv/O758bj9UIMStbUG+4J8zLio9+6wI/3m7AUr9B ec0yOwxPGYq5dOhCATUKXrXRmJClT74OiUXOu2ODQRs7uNtfdmDyot+EFbuVrt15 FYOHzQBLYSP+MA56wncRedx0VadP2Ytuz1J6MZPuQ22x6xwq/sbIs6yEToT6oH/I ZNF9A6fYjl4A/FStqIw6YfFZ+kZV9d4psX429zNPH18FbgMOErS7Xbfu/77jdPwX dfW1XCLaXrjXFLsOmbokoRAMgU4QskKkupDyplsg0IQ1YLSEZ9NopoNOBnJrfvB2 d6eS2Aj2NBNfBb68uDX12hBY0EANnImT8mlWCBq0OteQU+2BxcIfxuFZUp1KrNba wW+UJYmGp7c6ubHJ1eQSJOQmt9JNSKWyqmYaagn0CdS5K31/08+UYreW3A8C9wAk 5uli99DSp5pTSUQHoMN2TiI4LUv2YUMTJTr0IV3OBiKfKLe+wYs= =Nit0 -----END PGP SIGNATURE----- --aS7z2X+/JxBI+qpM--