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 1x3qIM-006hdv-1W for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2026 07:31:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x3qIL-005JyK-1b for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Sep 2026 07:31:05 +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 1x3qIL-005JyC-0h for pgsql-hackers@lists.postgresql.org; Tue, 08 Sep 2026 07:31:05 +0000 Received: from flow-a5-smtp.messagingengine.com ([103.168.172.140]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x3qIJ-00000004YcU-2HSC for pgsql-hackers@lists.postgresql.org; Tue, 08 Sep 2026 07:31:04 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailflow.phl.internal (Postfix) with ESMTP id 016BD1380161; Tue, 8 Sep 2026 03:31:03 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 08 Sep 2026 03:31:03 -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=1788852662; x= 1788859862; bh=XfVnCSvdOZt924FDqexQQhlD2wJ6bASTqkdCloLREGU=; b=q u1EUyxNUece0MheFnUldMq++fadNhJzITvrW3wCFgez0rNGZGlsgVNAE+l9fD9yz lhfo8Mq3XxymTLZeyPiXZ8kQ2ElzXTmvvWQwn8DdFm1iWJEH275F+DIrchu72zyG sFz8tB5ciHxsOCbro+0SgIl9Etzbe6+bP9F2NFqeHZ++UQ/4+uyDP03Sn2F49IVy 0TNibnxKu9hTrBlOBGo+yqCGQLqnjZXtzYrxFUOwgsyLftZxjsswHogdVdW4Y4IY rBeg+MNd+PhZ/gG7609Usssj5b0gULSXUu2CBP8Yrto4rWei/zjfHcf07n3Ad51a XEZ3VszEZwVc2SsNg/aug== 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=1788852662; x=1788859862; bh=X fVnCSvdOZt924FDqexQQhlD2wJ6bASTqkdCloLREGU=; b=s//BQ0KVl1w6xzOoJ gha5PcoWrYi8soipNGtC0UvTtXdWPkEOcPgByGHMyGe9cSzl4H/5ezOd3mpRRkcL We2GP4HPaSEwQJrSAQfu4uh32uHMXW/AcQqMrcxl8nvHDHUrunj3n9SiItdpiL8r 9OkPlOIW4271FiAonQRocqQtTcTRBvWQ/4SzZ+YChT+BMKxrPgTKJmOqHjesuWii NCbwklXpLXJll/BI/CVFmNeXWpeRYdE6nDqVSp8Xb6nrPzc3tYOndR+khQOhYB/c OSSIg0QzHeKvq5C8GHZTJmkai3U0/B1bl/cAOnMfY9s879QcpGzH93zDEfv/OxNA vqNjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEsVSViM1MWmTi4/zNF0Vv/RHE9nveOpBzS8a8duSACaKZyzGfNwupc7KyjUWKWMb GK1CJK6i4sEOaPRsNP8VmtTvUKPQN2/o/VZwV0PoBqEWpfMoZ7ro8c26SG7qiu430qosDY +qw2fNCClrMzraXm9mvBDK7sxzwE/CSAlTY9Xs9kVELQmpNJSHHVKXxehuxpX/PlebbVM2 2LJe693/vHFOA6dDryn1Kbo2Y1xBhrdtfi6Z5F13f7fPtSsI3NuOUzFLDwzpNcNsZrwCUg pF+O1b4HUUB4xo5ffFOLSK/MNe4tSa7c/GmY9NpwJfobfpZH03CPAB00L0zQWDzkm0uvRr 69YE1C1HtH+c2Y685nxMnNpIWET4IN4UwpVORjwOkm6daKsdTUFcTAXX+w+kiktQRHKd/P Yc5T1v8fYDRcE9tVdGI20M/Gzo2aQlSeG6nOdzyWx3YC7cVInVpGXIl3QDiFwKxpij18G4 WmP4VJoccE81Gy73ieU0mgNTzoYFAXVq6KO6zDYPbrfTqjeVXr7N03tmib3y8HbZYz4dR3 KAvyCRYKZNGA1FgBOCSCgQiSPtkTZzzqZQwJ4Ak1zY2oNhzfWSeeRZQvRAGwrBglEjwwOX 0JlOZu7kwUgqd+RLFCQLWDqkL41zijSKC+MZ0dIKTbr83X6dqOu5Cpblbx4Q X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Sep 2026 03:31:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1788852661; bh=jQVLJB4Uwqk4Fl2BhQcsk7hYrbgcoB78BJzAQc1Xx6s=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=hvls3OdLTfaCTYoOm5HoH1t3zGwunKCWRIvniitm4jUGXcS+2OSa/AN54wgKUnBk0 ySPIxI0kQBAaoQeuP/n/nN0bOZfZYjoD9tNeESGRlO7oaJw069BgebOGOv8G6LG7hz ak3DOBlQjNt1Zp/dhjK+Tf7MXKbN/oABT8p9FsMSurhyvICpKNx/oMB4fSeQlQ5nr2 QdbgaQd26ieZIcFXRN/NY6tomaPOeIc26WIiwq2IKWG+ZEHQqQYTebjfcvRDarLbjb V8oBKeTO1Isu2sUlNlnVGWYX52JzD+ZQZdEelZKHMlC0w8edBRemb4lxM1PEk4Egog XFaP4AMqMAnjg== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id E92BCB00186; Tue, 08 Sep 2026 08:31:01 +0100 (BST) Date: Tue, 8 Sep 2026 09:31:01 +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-06, shihao zhong wrote: > The worker waits for the first REPACK's XID in the snapshot builder. > It runs in its own session as the table owner, so the database-level > lock_timeout applies to it, and SET lock_timeout = 0 in the REPACK > session does not reach it. > > The attached patch turns the settable timeouts off in the worker, as > autovacuum does. statement_timeout and cancel on the REPACK session > still stop the whole command. Hmm, but there's no practical effect here, right? If it doesn't die because of this particular timeout, it will fail due to some other timeout. We just don't have an implementation that allows to run two concurrent REPACK CONCURRENTLY. Will you later suggest to turn off statement_timeout during REPACK? > Separately, the wait itself means REPACK (CONCURRENTLY) runs are > serialized. A PROC_IN_SAFE_IC-like flag could let the worker skip > other REPACK transactions; I can look into that if there is interest. Antonin Houska has a patch which would probably benefit from your review. https://postgr.es/m/108776.1784105248@localhost -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Hay dos momentos en la vida de un hombre en los que no debería especular: cuando puede permitírselo y cuando no puede" (Mark Twain)