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 1wzdGh-0048Dl-0o for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Aug 2026 16:47:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wzdGe-003OqO-2r for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Aug 2026 16:47:56 +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 1wzdGe-003Oq3-1t for pgsql-hackers@lists.postgresql.org; Thu, 27 Aug 2026 16:47:56 +0000 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wzdGd-00000002iIr-0FRI for pgsql-hackers@postgresql.org; Thu, 27 Aug 2026 16:47:55 +0000 Received: by mail-qv1-xf2b.google.com with SMTP id 6a1803df08f44-90cd4631090so10224666d6.1 for ; Thu, 27 Aug 2026 09:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787849274; x=1788454074; darn=postgresql.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=MhVmUNaQTraczxnO3ISeP6gn77HOTyRjtosT44JvbPY=; b=EAGZKrt9YEE3/uwuDPQMfQOs+Ftj5s6dIrvtdhiaKLjMLRvPYqeFOpqY2SMZlKYjNN wkI3/lfM5px7PQ8bfvRbO+Z8oWyo20ls+UqDWaGkMEcXRICcm05BfXCjf1uVXN2Y1r1P H2t8k50iQI+EevYieAQdjacleVnTHZR6f1J3QgJQ9KVi74SruPTldqdnDftU3Mp4pOek dht1GlKRcRc5HK5ANevNnPiQc1/jINQccVUlce3ith1uF7sTzT1vBYEwXbkvjZl/sehE PSqI0aUCPt4y7NjWjr9YAPuksdgI6DJu5M8yEDeb4qSEtCGLA+valZI0o1CAI1/VYP4o w0KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787849274; x=1788454074; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MhVmUNaQTraczxnO3ISeP6gn77HOTyRjtosT44JvbPY=; b=FAn90qKrjVJZ994uBZFNEQnSOU/F5ILWTDlGB3hJIw4N023U/VXZt4bbCBkSjWIStd pOc94il0RvbAnX/D4A9R7Hmak+hNR1vLxrwfdAiqGzuXE7UFCRSFj+B47ZGzTNqa6xnD weW38LbFZ065ysVMLWBONGgpwz4A+DGMKJTjCaGlS8M7/RmRTaZBzbB6+n+MlcREoNCn BEG/WQxhWr2izUoCbrPDmWAhE/vPhhIf9uBfhCz+uousbrONBgV9phZPbnCcYlIs6fzg YkZgRT/7Ux15FwYGBxEPfgzfUN2fuzP7QvTcqNOoZaZCKI7mTXc/8/rY8eC28xnMwdqe /dng== X-Gm-Message-State: AFuF++lXNDxlR/rqs5XXI8iiGCGqNzGpQ6wv6OvIutcnmEphDYetH0L9 7az+GGkUin5BeVZfUC7y2704TI8j1nQQ+8rXM7+PVTcv/myJJyPlZsrfQpoliw== X-Gm-Gg: AR+sD13XE4A4YQNE6a1PP7UvgjIqa1aoebs2JhFFk30pRvuZ5BXFkdipzrzP9DnV2U1 OFj6zRHvYJHAfQynmBctEEL6AKJRL9qBKM5/4um8bRzb0LJh1jbIg7lvC9qUopEl3T1Tijn7cfw 2g6yqx9I06NNk3jrSM2Vr2tY4fkCfRo4YQgrkSq+5ASak6TU2UU2Adc7NroijaVhecuU+hAYWyq uQRHsFCiYm8RhTL5QbQjAdNUeuDG7RI3+/UUsrBrekwOju+f0QJfNw+XWbcbhESBRg/u2P79KlL E3SwwlyqLTcUYNnir1zUIn1P2aCS2ecylzPyDx37rE/IDsjLvR9aGQo60J+36uQf0Rel3r1ZPPs Kb76ylJ5gujOyZNN0YV+fKz0R/fkpZ/4X1wBi7E6USrxOZCm38PF9J7snY1IJizfv9PrKGcMfBa T6HtFzwwuhOpzQfur+XalQQZsWLuX+59D5HNEnHxR8ew0CBBCZ8zyuqGdAK+ACwsW8lsmOlyOej f/DMH1CgpTxpXPsaJlLTzfu9FfZ7NCVIuGU6wPhmjegd36h3wbZ+sUThUojafhNsfAoTac7t56A 13QHiWdg0n0S1Vdvr1iYX7k4yQ== X-Received: by 2002:ad4:5c41:0:b0:908:4249:337f with SMTP id 6a1803df08f44-90ce0c19ae0mr7991896d6.5.1787849273889; Thu, 27 Aug 2026 09:47:53 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90cd7044547sm21059876d6.19.2026.08.27.09.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2026 09:47:53 -0700 (PDT) Date: Thu, 27 Aug 2026 11:47:51 -0500 From: Nathan Bossart To: Bharath Rupireddy Cc: PostgreSQL-development , =?utf-8?Q?=C3=81lvaro?= Herrera Subject: Re: REPACK (CONCURRENTLY) backend waits indefinitely when decoding worker fails to start Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Aug 27, 2026 at 09:41:49AM -0700, Bharath Rupireddy wrote: > REPACK (CONCURRENTLY) starts a decoding bgworker and then waits in > start_repack_decoding_worker() for the worker to set a shared-memory > flag. The wait has no liveness check on the worker itself. If the > worker never reaches that point (e.g., fork failure under memory > pressure, or when BecomeLockGroupMember() returns false, or early exit > before the shm_mq error redirect is set up), the backend waits > indefinitely with no way out other than cancellation. I reproduced > this with an induced fork failure, so I think we need to tighten this > for both PG19 and HEAD branches. Oops, I just concurrently reported this [0]. Note that teardown can deadlock, too. [0] https://postgr.es/m/apBpOVZOyqrakEr_%40nathan -- nathan