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 1x79nT-000000009tM-21Ux for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Sep 2026 10:56:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x79nS-00000003tRf-1ed5 for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Sep 2026 10:56: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.98.2) (envelope-from ) id 1x79nR-00000003tRX-11wm for pgsql-hackers@lists.postgresql.org; Thu, 17 Sep 2026 10:56:54 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x79nM-00000000zh8-3gjC for pgsql-hackers@lists.postgresql.org; Thu, 17 Sep 2026 10:56:52 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id D90A47A00B0; Thu, 17 Sep 2026 06:56:46 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Thu, 17 Sep 2026 06:56:46 -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=fm3; t=1789642606; x= 1789729006; bh=1oxoRQwUa4Yp95u5X9Lyqu4xxIIisQDgF/FDyUJN5fU=; b=Z dUhS+2Vx2Ijez7WeNmTpFCea2jiuXFFWulq8P7wIJTLL0laBI66jB9kxviTXcSY+ 6muit+uX3Lsl08L//qwDCXSMnQ7HmWVRdIZ6G2QP+oLrGVmuEr1THN+FyQKN1S47 THnp7x2BQPQxcLVJBaMufM9FTCe+yBVLwkcE8LCJPHeNTitToKsiC7FKzQpGF2m9 l2r0j4LV8xSt+JVMElSiYfO3plkxLuID1T2r/zmytgree5z4W858eCKo6PltI4z8 Z2WKWwDCn9JCnJb1y9W7Yb3av9m2WHSfNouBHWKAM2fAWZD6nUFAVA5r9CcdloCz F8hU9SzPOGPVlcU51BLJg== 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=1789642606; x=1789729006; bh=1 oxoRQwUa4Yp95u5X9Lyqu4xxIIisQDgF/FDyUJN5fU=; b=M8MM22PQVRKpjv+Dh OViqw6yRYUVopeBi0YZlohcnzuPBOtFNEnSq+d3uqT0llf1nqKdKGKjlIIE4HKps caaZ2IjiabCGzz1jncPIuO5n8xSLhPGv89np0KSUgt4Eza0++nvxG+3HyHgwGj6d PiU8Z+sKG/bR4mbHMdvRGUscPne8ve9Ni/dVaTaPzMQmHjDhrXx9SJ5pcjUvm2i/ H36NvFi95TmQb6jSEdbugNCxOaJsK1dt35vsPh8VAkFahbCT4hU7ZvpS6lH9Npph NOmsnKY703UVqj0Utff1NKLsp3+CMoMIud2Lcpw0HKNWy6sypPDgz/Eo3bib57+b f5faA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEm5+pCTZbUpZY8uo8QGaJpziHmj99qllemvDhiTpbNM1NXkDsSPlY+hkhQvsoqvu BJzqaQjhbHTZuFffI+mkU8BLp/2BgvDOOsz74vh/bPszmr8n8Xw4O6zS1QChjQVm2Hf+DT BeFPZ4SHbKXiiyKYdykU385y3xr9EoWGclUNfZN++Twe7QMl2qu57QhMeEisOLypxQXwKv Iicru35EbUBJaQl64YJlDPewY8mqpHHKm5gBkwrD/cnF8mDpZ8AE6Bruhxg4zdsMDvodba BKzfrGB0p9bYASZSe4qH1BN5vHqg26GXyICwNtCmb5cXVncKHSbE3APP0dwEsyN9dJboFL 9xZo2vkCLxrolrlIQfcMQQg3MyJ9pQJHwj/+/wRrGvOIM40xxiHSzOkQGY/SFAEiJYeMQr XHye7eiZjWMOGOAeiR1BhaLDzdkbl/qqQSZNGflU6VK0gTuDs7+1lJjRUkLp3slwcjZ28+ W3xuMSmc1i6GE6O4rSPjrwcy+5Z8qpWrfVcRnGwU3VzaFmidb6e2Kb9uFXoyvbzqr9Otnl Zy2USk+0Qi/5tWx/tsPF98q9CFVB/yUIon0bL5MRBVaEb99OVmrii1AKqwTv7JTC04usol jlGK9PnhRj4GD/loY+vbEmAC0IWtOj/fwgjgTp8TCc/YQ1ew8iD/coHW+GhA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 17 Sep 2026 06:56:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1789642603; bh=1icj9hoVa3wVk4ptoCeZ5vk+umqT8rgTXovb+z2J9LQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=JSjIDMOkRFvy9PFKFmz6GcUrYYh1LMDXaLvc2A9zg0qIq1qUN4GSdua7TLrhsZ1te aEpxi02gPUgCCA2Qj+0d/WQOx37hMVY4t0VYzNrQYlcJzOkk44OPnewpLFvjamApsF PMlGG60o+ZIvYvYt0w0V03ukNe7NsmnkbX6SDAWcOoHlp2p/V4naZkTvbnmo+DIRXg cg1Q1j8GB1NI/M7Hgyysd58tGhrsb718c5vsB6medo5rTkD7obZJM4NArif6rVDUYP TOrN+LWUrlQMXLzTyD44iTAAAklN7J8sn7eoyacbbayajEC36M90kb535K8pFBz4fL 5nQ8WTvaLi8cQ== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id ACF40B00653; Thu, 17 Sep 2026 12:56:43 +0200 (CEST) Date: Thu, 17 Sep 2026 12:56:43 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: shihao zhong Cc: Chao Li , 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-12, shihao zhong wrote: > 1. The comment in RepackWorkerMain() now says why only lock_timeout and > transaction_timeout are passed. lock_timeout is armed by any lock wait, > and transaction_timeout by StartTransaction(). Both can fire in the > worker: the wait for older transactions in the snapshot builder is a > lock wait, and the worker's transaction spans the whole command. > statement_timeout and idle_in_transaction_session_timeout are only > armed by the command loop in PostgresMain(), which a background worker > never runs. I hope that answers Chao's question without touching > autovacuum. Thanks. I pushed the patch, but didn't keep the detailed comment. I don't think we need to explain the details of how these timeouts work in this comment, and it may be easy for the comment to become outdated. I added the word "relevant" to the comment, to try and satisfy Chao's concern: a reader of this code trying to add a new worker will have to figure out what does "relevant" mean in whatever case they're trying to implement :-) > 2. A lock_timeout on the table owner role does not reach the worker, > and one set in the REPACK session does. It fails on unpatched master > and passes with 0001. Did you mean to reference the proposed new test in this paragraph? I think so, but the text says something else. (I don't really know what the text tries to convey). Anyway, I didn't push this test either, because I think it's likely to fail randomly on slow buildfarm machines, so we would have to adjust the timeouts, and that becomes a whack-a-mole game that I'm not very interested in playing at this point. Thanks for the report and fix, -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Before you were born your parents weren't as boring as they are now. They got that way paying your bills, cleaning up your room and listening to you tell them how idealistic you are." -- Charles J. Sykes' advice to teenagers