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 1wPnIj-00127p-2w for pgsql-hackers@arkaria.postgresql.org; Wed, 20 May 2026 20:13:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wPnIf-008LDW-2p for pgsql-hackers@arkaria.postgresql.org; Wed, 20 May 2026 20:13:54 +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.96) (envelope-from ) id 1wPnIf-008LDN-0Z for pgsql-hackers@lists.postgresql.org; Wed, 20 May 2026 20:13:54 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wPnIc-00000000bQ5-0sRL for pgsql-hackers@lists.postgresql.org; Wed, 20 May 2026 20:13:53 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 94C947A0059; Wed, 20 May 2026 16:13:47 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Wed, 20 May 2026 16:13:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1779308027; x= 1779394427; bh=ZnFvjFRpCkjxhsQ/CQqTDqI4yfNw3FyoeoHU49R+07M=; b=E OveaP8YzYcHREus4BEVy3IIIbRN+YFfkxyBnOzJx+OKmC1xq5c3oY4WZlIdQ02Py W7s2+skNsXTPAzexLlCG5kSLFev/81h3AY7DD3IHc2Wa80ZIZuKKcFNOJYwivXlw qzUl32wSpqV4VMzOlyYxwa3K5lvEeJEHqY1hNel3QvAHmS+Yo/xJl7h6ugrrUBuF 8e9a+sdC9KUSzvlmGIi47jHdUIJZy7F64a1zfct04T1T8wJ6zlwMrUhZpELEma4g lpR/KDRj20BHXQuhZ6CqBSMAX66NPtL/yNdgD63SsKX2AWVz3wdkZUaIdE7olwF2 CWUW5uauLggjqRcR+bn9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1779308027; x=1779394427; bh=Z nFvjFRpCkjxhsQ/CQqTDqI4yfNw3FyoeoHU49R+07M=; b=sntJGMBVnY/iywREf bGl2kdq68faDxQCo2HyMcdLJ3flGPKyh7aYFkxX7o6zqv9LlsTHs3vOXAOmXNu+m 3pcGPcPKORLMcFaXmFTSUtpEhp0loveir8ScLKaUohWwxVqoo4h5sT9zAQ7D4Cqw b3ncFY92wZZ+32+audPInaUwhNAWSQkMXC/tyYPsD8T0c9wBqPCI0ksfaKVpRWlZ 3Xpu9/pEsy75ruikauQtfhAMBsE7OlDZDkHORhivBzy2W+ngBiUfbrQk8+aVNg5o Fq37Dy3aBDkDajCMw6KmdkuRYn4fJu2RsIVUY8giKxXAEiaB0+tAKF3Yy8ZBKK66 sk7gQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddugeehheeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeeiheehkeekleegueeifedvffegtddugeffheehfeeftdduhfdtkeef leelkeffjeenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegrhhestgihsggvrhhtvggtrdgrthdprhgtphhtthhopegsrghj ihdrphhguggvvhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkh gvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 May 2026 16:13:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1779308023; bh=EXxsPJNItNlAAtyR5nqotyoNlMRtq9c9KncB/mvzzxg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=on/rZpnW9+JlGz2y93oBEiLxQeeTdzaEpsWOCBqly/lhjqiQOFA9ngopOQDAz3Kf1 M+POcr2nhraAGpOPQFEKx52txTCw2rhlQVoNZeVIvMkQCBk9cZYLdAy9y3Ie/Aftl/ EwaecGO3v42XYbkTpFXvGZAHYiFcJ79keAd+8KmzqisIHBkovVeFmvXG97fB+BOxU0 MNClYXy0aYfFDfgWmBtPMmiY4Lm8wJMlQGJdLWi86rLV86fDyV4sAkOYpVdJ3z88YR +LjqtDLk7sEd9zjhTp3RwsF+IeuaFN0uR4Cm0RnLEI5X1bK7j8Jjb6cxGR9/eSOojE Ay+ND01Q8eENA== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 48001B04152; Wed, 20 May 2026 22:13:43 +0200 (CEST) Date: Wed, 20 May 2026 13:13:43 -0700 From: Alvaro Herrera To: Antonin Houska Cc: Baji Shaik , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Fix REPACK decoding worker not cleaned up on FATAL exit Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8656.1779263646@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-May-20, Antonin Houska wrote: > Alvaro Herrera wrote: > The call of shm_mq_detach() got lost, or do you rely on dsm_detach() to call > shm_mq_detach_callback() ? The latter does not free ->mqh_buffer. Hmm, this I think this is a code documentation bug then, because the comment for shm_mq_attach() says * If seg != NULL, the queue will be automatically detached when that dynamic * shared memory segment is detached. I think it's strange, or buggy even, to say that "the queue is automatically detached", but that you still have to call dsm_mq_detach() afterwards. I can put back the shm_mq_detach() call, of course. > + * Now detach from our shared memory segment. In error cases there might > + * still be messages from the worker in the queue, which ProcessInterrupts > + * would try to read; this is pointless (and causes an assertion failure), > + * so set the global pointer to NULL to have ProcessRepackMessages ignore > + * them. > I suppose the reason for the assertion failure was reading from the queue > after the backend had detached from it? Thanks for fixing that. Yeah, that's exactly what happened. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "La vida es para el que se aventura"