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 1xDoa0-00000000jCS-1aO6 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Oct 2026 19:42:32 +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 1xDoZz-0000000ChBJ-0XJA for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Oct 2026 19:42:31 +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 1xDoZy-0000000ChBA-3XNs for pgsql-hackers@lists.postgresql.org; Mon, 05 Oct 2026 19:42:30 +0000 Received: from mail-vs2-x28.google.com ([2a00:1450:4864:3a::28]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xDoZw-00000000aEK-26U2 for pgsql-hackers@lists.postgresql.org; Mon, 05 Oct 2026 19:42:30 +0000 Received: by mail-vs2-x28.google.com with SMTP id 71dfb90a1353d-5d7137006b2so43478e0c.3 for ; Mon, 05 Oct 2026 12:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791229347; x=1791834147; darn=lists.postgresql.org; h=mime-version:content-transfer-encoding:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=o9hEELpYdnUz4ejti4S4YqUI+ytqIBxHFE0/kZbExn0=; b=VlNC6pivA47rOlG6FYm8iCvQMI1+xsU7BkymDxAF/cQ5QMqSU2+cIKt7MdXllHrQbc /1gE8WTFZZ9X5Cd0YR65s2R7xKWGv19BFWHwuY16Hkgdw7zn46VP5smB6xpT4cIgoYi7 ohidPi9xbBd6e1w1InURfV/p+8RIYxbAT8UjmG0atVg1W+uyKUXVN8CPVDNtUS9uRhVv wf5sTgBNrvj5rlcyUkJEKYyBx4bRxgWAweyvcebO6NCZwkmyrVvR7QcoPkNr5Rh+l+kh wdcrWwbNx9ErA8+V3KLzz/+vYBS7aKOo3R0Tm1XogcSiPBIWVCmwxCbDKe7axeodXecP TuNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791229347; x=1791834147; h=mime-version:content-transfer-encoding:content-type:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=o9hEELpYdnUz4ejti4S4YqUI+ytqIBxHFE0/kZbExn0=; b=Ws/n+TLITofrgRgiViuB+w/k8xRhUtdcdgpRJermkcLxKiRsYUpTElFo0Vl16xotdw KeOfQAZsGrrvPzDIF8TBcCrxADdo2qP+w/MREZK4dGAHXDxyHVC20Dcw7EmrPivKdSWc WAwADhaVNj1kYGiUaIIBteEyaolVfV/Ae6YQdC21Giznj0YT2bJ7IYHSjOSVp4z4XPu4 asCOflMoBQ50vc9Z/CiWXInuVim+hzNek9j7cXGqp7msILHvkq8c/nqoYtjuUpocCPFU OIlTb1dGJoK9ZwN1sXsZSxDqJkuF1fY3r+FwUA3w1JeZvWNThCXF0gD/YdXNFCAQkGTs ixuw== X-Forwarded-Encrypted: i=1; AKwUvBw6CcF1TPU0RzrqE1bKRCUsTT3iCE4GgcpH++dT+KzHjWXCeKoxyE1x4uKWOiKjPZgcMZrEs3DTKzE71uz+@lists.postgresql.org X-Gm-Message-State: AFq9FYJi8YmNMNxcaUoOkH1iu+sAjPqwJX2yuwxnFgl94BoeO1aT0GVZ bZNeRckyVkRadga+6pQ0WbQJ3S6tmysGJPK0T758MdFKs/WFvEsNl1u2 X-Gm-Gg: AYBFou2FZRWNUVTSb9K/n5Q9GKc6Rmw0uaXq55rsQgnuntUxFIewEXbBbP8EjPyhceR B9tzJe/kBd7/LQs+PVTvihVWZ4JIrNjBhBa3B2zFn0iiEgL7XWX1MZJhxuQ3l3DQIH85fHCesJc 5U52/Y8cM8RAfVxHllxOJyNj9KahcH2GV2i7JVkUJMjGCNfhzZoRHhpBXz8MMQTZFHwDLRdruzR 1GaOkUug4rV5qP9C+7ZJQW45uhKEftCr/a1krfLVZgt96ICEFNW4DVRbXQNE+uoctUPnAokP3+c HMoeQoWIFehYovThz+ul8AAbZQr6xWLM0ypNHsLwjFy9SoeSJkzk8P6jCDAg6UcCfm5tnwQyR+J zUDO9HLxtQKlMvFI0kAFT739lSErYWK0D1TRfciNQU+c0GeC1W3SfFxqdkp1+oCrWnq99liebBr nsYJA/Vv168JjHDnsmIrAsEG1Bqqwykfhkz3Leq18vdIcP9dNtXT8KX5utARoOSEJp216YbnENv lPg4xCZCDK4KfQfRTrBwHMSP/WEn8xwzJ1nMRb7RsESQiwYZeDtEHRDUBvQtu6GDslgADryyCVX EUQTKb6zsfWI0xLE4teaLlaFzA== X-Received: by 2002:a05:6122:4a1a:10b0:5c9:fe51:53d5 with SMTP id 71dfb90a1353d-5dc8f10b82cmr1588254e0c.1.1791229346795; Mon, 05 Oct 2026 12:42:26 -0700 (PDT) Received: from 192.168.1.109 ([2803:3c90:cee:ea00:5c3c:7e70:29e3:7a55]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5e54e7ff75dsm438462e0c.5.2026.10.05.12.42.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2026 12:42:26 -0700 (PDT) From: Manu To: Michael Paquier Cc: Kirill Reshke , pgsql-hackers@lists.postgresql.org Subject: Re: Fix reindexdb with parallel index-level conrurrent run Date: Mon, 05 Oct 2026 16:42:21 -0300 Message-ID: <179122934183.429794.212586221593626226@gmail.com> In-Reply-To: References: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Michael, > so I'd wonder about just returning an error first Agreed. The only case that fails is two or more of the named indexes sharing a table with -j >= 2 (they batch into one multi-statement query). And for that case --jobs cannot parallelize anyway: the indexes of one table have to be reindexed one at a time to avoid deadlocks. So fixing the parallel path unlocks no speed, it only removes the error. Erroring out looks right to me; a clear message would beat today's "cannot run inside a transaction block". Happy to write that. Regards, Manu