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 1wBwHO-001WAE-07 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 14:59:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wBwHM-002d2S-0u for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2026 14:59:17 +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 1wBwHL-002d2K-2w for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 14:59:16 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wBwHK-00000000gTg-3KXP for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2026 14:59:16 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-3878de20527so27709101fa.3 for ; Sun, 12 Apr 2026 07:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776005949; cv=none; d=google.com; s=arc-20240605; b=TbCpCzle0sSC+EeJSi4ThbBtWfw6PDRXLploy+HEI4B3WkptXmiEoFAgJXKcUcExOW 6IwYkAdRAPgUANAd/HGCe6dHgDB/lqyfcFNl4BsFetLe0W0TT/17eUYQio99jVJdo9ZU VJBsPpL0jLspWm1SAiLMM50C0NsafbqFn3Ep52ZXtGgmt3t9na2joN5V0fkFR3q/BHQu n1txUDE9iagkyNk3IaHF8DVDaXC+vmWlGGae14S97A9unmxSAzJI0ZRY0P77cNzuEGDB E/QRPTXWWVWX0ruwuNWRtr8TAsiiUb73zzX0izzXLzePVX7nJYDr0NEi+aBQjs4vYORp BYww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Nh3Tu6LSAlo2iGmkzhcIFafvbfAlJqoBXsglht5Aei0=; fh=0ZknFbQv1JzeI/zOXyfZFlaiWYD+m0XFRtHeqd+jfLY=; b=JxyJkeaskN+3lReu01rfoYK3i+q+cn+J9/A4gp0NJiDz99G4uqL7jPudkF5u05UWq8 LlzJNIRxp1MfUAn5abHT6E7VityZhxCylLeZ39Rgwlz/iCQKhZ77WHY58FxHRqQz4K/P +iUO9ykhEZ8BlcCMegZRyDUVd8WuaEe2+ay47vFBpQ0Of4fa1fEN3HYEuqrcUMeHpf+X s8Y8tLhCSTp/irVquDWmnTATXxGu4IDJu+9kWW0VfoXg9An0Fp5/z2PR3HxNG6USTImB hklQHkmpaoQ24Cmm3VdtWRF+cqtd3P9cVCA2NuGXr+MvBjehHIHv4JhguZotgGbgk3e1 bK4g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776005949; x=1776610749; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Nh3Tu6LSAlo2iGmkzhcIFafvbfAlJqoBXsglht5Aei0=; b=LckCVYSGG76CEqzFk2gD7QRkTk66sBD3AyM+oKfoOIbZHL9/1qeQag7WKxKQorsdw5 KH5OnvRVhoxj1aQZfUroZLpak4GK/7tUd4OZVhD+O9zZlWUu126vlhEuqyJ1YlxkqnMQ PturMwEQD3xP8FfXC8EQQL9GrmRwwPiOPU0fegwLboqn3jWWDbL1y4RgOAihEIMgtH0E n+Rj6ULE2CoPIhw4O/z/BzYAv14JiqfH62d0Jf/gMkacafMPJNOzex+thBrkqNGpIcYh x50XJzorli687pXr8E+i3oWBcQhFLjGhqaMV8i3O74TZC/4a0bOwnfWSMsbh82/UkKQY QJXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776005949; x=1776610749; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Nh3Tu6LSAlo2iGmkzhcIFafvbfAlJqoBXsglht5Aei0=; b=QvjWyUA9F828W/qxL3E+x3XvEIem1k7/AuCo94UUCwLJN3kE69mGKYFuCTvdqsd+hk DEE+papfuYPSnE9JITe0i8SiLBY9H7004NUSeCsLWeYwvDCfg5STOLxNg0Q+pNf2vZF6 YIwJVsJyV7V6G39RrD5uzBM7jJehA7NhBppL0AxSyrTUyMSD1qMQua+6ufOxxvBamF8T fCMbNFQsFMKZ3D+X+A2FnSuTsg7wsvh/Ml2eEOlcORuSWunBPl2sBMM+7hX0N6+WFlin nrQgTlgosVe+xBFhNM2S+sgGXAAG15sxQ8bHwzcUSo/kUfxboUyCvGXnMFe+MjP+gXtc TYAw== X-Forwarded-Encrypted: i=1; AFNElJ+QSmTZl+2WxVY7Nv9o+Pu69cmYociIc7FHuUSYy7E71jEI7oikqDHdb33nWtjczAUHPPJprWKv2R0vOf2A@lists.postgresql.org X-Gm-Message-State: AOJu0YzioZPfTEb8rd4XcNIzY0BURI1eoXdzjV6g9YW1KCYnRHgqxxDg rhEPRYnZBQBbeSFL0+WqHdU4QXA2/8jfMIfcyTonj7fHcOswr9GwnnWB+eNiO3VqccwVhGaDqxF rBCuMQscWKdwo+TqxKGfgZ39TQITlyZ0= X-Gm-Gg: AeBDievMsnjETcP3geVM1lWCUj7uAjBfaOoeA7BZGmlzPPYwxwL70kXhMP4WXESKSyl DWUjNnGIbX4007xro/8fqoOx3qmDGd4qCDYNG7O7r0PqFiNH4Mc91+dzwSsHj4Fvpf0RIASj5Q9 eSrfbQOaYaHUJ0+SrTN5YzczESlvfOeGGIqvBkCqsmmJhRuLqz2YTrVJGuKJTlFxQlh1iCO8gIi aJUJsMSbz3KnELdXqTPX/PElQjOLQp5cUP4ZpC9+glU0EW6xdZ/CCHB98ebCKt+whLEveyL1H5o v9BkSifJ4VOnrZjIkZNjhOPBHUSLiGZc6u/KDQxbvTbmkTkbBYkOknOmq6btqf3j9QeE3JNzGG2 Lo+/t5Q9Nhet3V5aXJArNPLAD6ie+BtkzbNyndA== X-Received: by 2002:a05:6512:68b:b0:5a2:836a:ca47 with SMTP id 2adb3069b0e04-5a3efb285efmr3305186e87.20.1776005948715; Sun, 12 Apr 2026 07:59:08 -0700 (PDT) MIME-Version: 1.0 References: <202604062213.cgo352cdsgsm@alvherre.pgsql> <4n4q3preb3lgyhpzstebhux7b2aojhsw7gik4ivaznyggiezrs@lrznutssxlh2> <9539.1775724194@localhost> In-Reply-To: From: Mihail Nikalayeu Date: Sun, 12 Apr 2026 16:58:31 +0200 X-Gm-Features: AQROBzAUfee2wETXLwq3JitVbk5zGZRJYbDKaSxzXVYic5zSpRRcJeP15OrIseg Message-ID: Subject: Re: Adding REPACK [concurrently] To: Andres Freund Cc: Antonin Houska , Amit Kapila , Alvaro Herrera , Srinath Reddy Sadipiralla , Matthias van de Meent , Pg Hackers , Robert Treat Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi! On Sun, Apr 12, 2026 at 4:05=E2=80=AFPM Andres Freund = wrote: > I don't think that's as good. The problem is that that way you're only > detecting the deadlocks once they have materialized (i.e. once repack act= ually > does the lock upgrade), rather than cancelling when we know that the prob= lem > starts. Having sessions pointlessly blocked for many hours is bad. O, I think I understand you now. You propose to somehow mark SUEL as "going to become AEL, so, the deadlock detector should treat it as such". In that case LOCK TABLE should get some kind of "future deadlock detected". Yep, that feels much better. I'll try to check that approach tomorrow. Best regards, Mikhail.