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 1x4Gn8-0072bg-1Q for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 11:48:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4Gn6-00EO3f-0D for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Sep 2026 11:48: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.96) (envelope-from ) id 1x4Gn5-00EO3W-1c for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 11:48:35 +0000 Received: from flow-a6-smtp.messagingengine.com ([103.168.172.141]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x4Gn2-00000003khZ-2XBd for pgsql-hackers@lists.postgresql.org; Wed, 09 Sep 2026 11:48:35 +0000 Received: from phl-compute-08.internal (phl-compute-08.internal [10.202.2.48]) by mailflow.phl.internal (Postfix) with ESMTP id 1549A1380271; Wed, 9 Sep 2026 07:48:31 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 09 Sep 2026 07:48:31 -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=1788954511; x= 1788961711; bh=L8z1PtyyvhLz21xDE/WlLtJBqqmgQjZkzvxZt0283dA=; b=P UyzDlXmcT6IAl087uzjvrAcb+r8wpDfAELJy2Jld4SxHCfjBJ7hNlXZoG43XAmXl xrNT+QC2zpCK8NaQq/acJNcB3QTIZqjf/OUdQ6hUQE7FhAI36Tbu2vdRdSoFos5n jmls2xH4ZRFK0ySkb2wVnmtW/xiPhBMyW79/zpvcJsAzMD651SeDwjO8Lwq29Jfs ERWAkm6hUT/NlHsprA9VR4qhuNQVXDRLYrG6CbvIUbmEaMkxj0Xugz62+YyjA9jd C5jz/o6hG6Jrm+mIWKOd4UQdHNwuPOybTXbfAWcS8LCce4caYuPgeHVbzqyrIHcz WDDY0qsMjciYRBZkNahWA== 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=fm1; t=1788954511; x=1788961711; bh=L 8z1PtyyvhLz21xDE/WlLtJBqqmgQjZkzvxZt0283dA=; b=S7Cb2w2FG/V3sMeFA /hFCc1kWOZzfy2FmqYY3wSSkiiB4mmd4NRlmpZbYjOvGl1zkDM7UliAROUJQ/fjy wM1aEDs6ZNT8GAxY25a5dVy1GKTN6fYZ5VLMwBZ5iZ0KltboYLKLEgOa/edoLcd7 3L3HBhfQU0QyuVe7yOOdXpWEpnYuh0SvisaQjhHor2PgJxiTJSoy8vA/dFUZ69JG wUcIABVZ4vAf0qpfJ292Z1rBOT8miwx9xsAloce6mP8BIvsVWleVVqw/UiPF8u/X BmOP0wg/P6c2I2rvtYYid3yJZwjaUz+cXvT+GPM7aRo3GWt2iOCBzkLe4I43CNVP IeAPQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEbAcs48akucP6y3QLnR3jpmUBXC1cRwokJsrKb7FzyhMxY6mZs6zGdj4U+hX/YVh dIW7R70z7G8b7+28Kx+8E3HHkASSYoLX7UoJO0RzS+9yFirn0jVVI6AAF5kdjUx4cmCtmT QBfm6KuZAEC2UHNw8fbtjAptY/thqoqsR6xpuFvSPdypsmLbiVCshuQh0Y52TBMEAkX7rU nd7Y1ja0AjD1ZF1n9NL4VOHdRMtZfEhb+9nG7bkKFsFugCe+ELUK3JiYZCkH64PD2vuX6M VZEKC1j74lKstpvWTSqQiAZFSljkagJF7KzDrjQTW0BmjMh1U6gOnmpUN0b49JaW8YVoXe mO/uM65PfIuCxGz2bLcA68xivVLREbl/9ifL9VEmmYSQQRldgWWBGigd4b7tmIcQgrnrCw Feckw4zoFRMqetrlyLB2VueyJbXTU1GTu5PY/dr12md1BhFoiRs4MTgJIUqRrvl/+PtNxT FeFs6WQ1mR/fLflL1hJDMgURN2a4cthV1hEJy+fDgTM910I47NDtUHpE9vo+/5UEvlUwhZ 6W5xUKwNnnHjeHeQzuTOxyB1ghCK8LgYC+qQ2pJOkcvTB/NBgFh+jczXEIFlKbELTSnUqT qerhCZeJR6UCXkl6DCRloM8I7Z5dBl3RfUP9AbqwIIQcIJsBw8ee2Rbb6jew X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Sep 2026 07:48:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1788954506; bh=kHOtz85NGSZXL3ASjMCTBifU8ycMvXjvJemY9+S9/D4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=I9JhudQqlIyi8C6njW4vQ2XKeWaWCGXe3i7+QaCQ6RvHVrZaZSDGoN6jDsuVfQcFy Aj2N3dThDycbhMsQmTsynCZOmAgS6V31lz/CfrsPpchlktO68EIXMkGb3geID+H/CB fd3eoJiEnlQBlkBYznxF3+hy3NUw9JPJAHz3tqPLVlenoKAX9DQYx5yvuxlrkVpHHe Si8sHpsZv+CGWMAp68t8RsDKRg3JYI5xgnl7baFgcLOHGpkQlJ18fs+Ze4SkDJcN4R l94ioXWzJIHOBPKQP7tAu3BNYw63ZF9kxEslqSa0KlF1f70UJOqcMMP5ncCgcXLFXy 6a9Dmp6IggOrw== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id EBB8AB00039; Wed, 09 Sep 2026 13:48:26 +0200 (CEST) Date: Wed, 9 Sep 2026 13:48:26 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: shihao zhong Cc: pgsql-hackers Subject: Re: REPACK (CONCURRENTLY) decoding worker is canceled by lock_timeout Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-Sep-08, shihao zhong wrote: > It's in the patch already. My first email was sloppy about this. What I > meant was that a timeout or a cancel on the caller's own session still > kills the command, and the patch leaves that alone. statement_timeout > and idle_in_transaction_session_timeout aren't fire in a bgworker > anyway. I only kept them so the block reads the same as autovacuum. > What bothers me is that the caller can't work around it. A session > level SET doesn't reach the worker. Ahh, that changes the problem framing completely, and I understand your whole point now. I'm not sure what the best solution is though, but I'm not convinced that resetting the timeouts completely is it. I would prefer to have a way to transmit the effective values from the leader backend to the worker: that way, you use a session-level SET and that is also valid in the worker. I guess the question is how to effect such a transmission ... > > Antonin Houska has a patch which would probably benefit from your > > review. https://postgr.es/m/108776.1784105248@localhost > > Thanks for pointing me to Antonin's patch. I don't think it helps here > though. Oh, I didn't intend to suggest that Antonin's patch helps this case, but rather that if you have development gray cells to spare in connection with REPACK, that's a very good place to put them to work. > I do want to look at his work properly, but I'll do that on his > own thread rather than here. Sounds good! -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Investigación es lo que hago cuando no sé lo que estoy haciendo" (Wernher von Braun)