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 1wIPWF-008441-36 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2026 11:25:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wIPWE-007F0E-3C for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2026 11:25:22 +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 1wIPWE-007Ezo-2B for pgsql-hackers@lists.postgresql.org; Thu, 30 Apr 2026 11:25:22 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wIPWC-00000003VDa-2UFA for pgsql-hackers@lists.postgresql.org; Thu, 30 Apr 2026 11:25:21 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5a337552604so769308e87.2 for ; Thu, 30 Apr 2026 04:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777548319; cv=none; d=google.com; s=arc-20240605; b=JHFkn0sXHMXrBYCIpL52JrCwrJ7pieIlJOt8QHvB27X8ziZMqpYwbQr5Jy4khaljsj dVvIUpz1qNG0KmrM70RAZ15MqwsXZ5MB16pIPUv7UKinDZMf0keZgGYLoN4+ob/M7+SQ zPe7JGATOmtsTUndm+5kHrU+rnmo3kQ6PT5XnSZZrE7gai2ZTkYO33bg/ZAxLTgXtMB9 VNs8sjFvHnuIKlLBUmVw/m1DGjrPlOvufpwdcfJq0suql9/ZkTrcvALi7nf/c9IAXTcH gNiyahceetIQgvTrIMJNr7afBIn4WR3xPQq+53po6aCd2MBrbaFgX72AWzrMl+I12LO7 74UQ== 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=1Dec5NK4MNhCda15GrrvXrcEDwSrsNhHwruP9xintiI=; fh=lcbtNmBfWw0xZ86GwqBvfy/gm+4w7yK7zq43p07PS+A=; b=lGVAuGvQFmFx8Gx9Q2VSG3OYbs97hoTAp/Z1Mk5o08/5CH4lbGWhicU4xqmCq7VqNf B1UwcvU3cpc69goKutkbC8zKju2RpWNWxImA1noYv/Fv0ki4HDtRL48JmfWEra0NPkuj qyUAY+kgf2qyjce5mnKaEVwM+6LnlOFxBpmZ1WgG/nvGSk7eGf6ztUtVG7xvi7CSNE1e x15+pVQjqyE0iHy+oEa/UCKOW6tQkWxaL7DbjnqM1fyMuyLjlBdWmna1HgGYqk5LLsS2 ak+eC4EyfxDntmSGLdTEpr9cIAeCn2yDnwc0AtFgfCVG/quvkcnmv99vygLilLOM7ikJ Gyog==; 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=1777548319; x=1778153119; 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=1Dec5NK4MNhCda15GrrvXrcEDwSrsNhHwruP9xintiI=; b=WeRbMz/FK5MqQD/WlgQzvd/lh1oeHu+iOKmeuGDfVKObK18v9h3KN/ma+31AlGe3B0 7wZpNixkad3GPqxxLvGxPumLkY+3k7Tj1J044XslvuFzTgV4eWT4V3XV1B88vrPNEgh1 lWcHT66O3MCDq6coRyXkW6aTDjmPn0RzxrSz2TxhFEfjRoecaki+eyBL3SgCx1Ar1qBF uI6HYcskHHd8NHAsEVSnFVb1Q8YFYMOtjNs4DaZc9JYX6pCvnk4jplBeHdHXMHtg0xMh C61THCQ+Wb6l+9D+geU13/3AEijVteZwjq8fbbEURwZqVkd/6jxfGP9cmgco5AKaBNDR uT4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777548319; x=1778153119; 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=1Dec5NK4MNhCda15GrrvXrcEDwSrsNhHwruP9xintiI=; b=KiZUcueQCLRl4TDn1k3oHMxl4QuIIVz2RqjZSmMtbX0Igrnzhcfz3tUo99zmsOsPQV J9iZouvww1vMDyRWQ3IRx8iBHYB/tBiEg3zPYxxyjIQj9ERoUAwVAeUIike5qSa94YTr z2cV71pmkhA0LSYJcCvz9i1EVrYvbYx7epOqKayPVwX+l0nuBW4g5kIHGjmWYICcGmI/ +YqM/W8KXc/aWe46GHyDpwjZO+oZWfnXPBfgTqmVtRetTb4emvCrgMjLEphTHYHs1aD3 EuETW/BU+D7JBLoAnLIg3urpAlefnLqc9sZah/HWcZZxURWZY78FfESgSvLZeCsi4nuv lYTQ== X-Forwarded-Encrypted: i=1; AFNElJ9maxdBuiMPKSZRcIQVuI4PWwTBHz5Efm++8GYSNU0+b+DzJaMVEx+CpgC4EsBoxSZxonOg2FFAk4rgB987@lists.postgresql.org X-Gm-Message-State: AOJu0YwxbOQrnih02UYbnVdMC56LMXsjhkh1U0vXnlOpJIpJn0UtE6u+ kNsGUo8rpiAcu/rKibG6T1b4JpOEn37Swkeg4SVPVLvN9yQyEsHldhdXSWrXtXSV+KraO82Utuh 6HVy6HAmHstP9p9S9EsAhgwcrZTa40iQ= X-Gm-Gg: AeBDiesp8Sec114frD3skh5qi3xqbUigY20YXgQNbNL0lKINWqd0p5O5LkejeS57s1V FZ95789bNkMu4EGriFhlVeVr+v6d1P9O1/7KNTlX8sg6OOcmEz79lsGplvcPmrITvJqHMVcP0zL FUr7wSkyvXRztv6M6V+nIAG0wo9M7hpODdZcZNVh579lLxunMhn3zpIW+38iGu90b/KZny3ZJEz QlC0CR+SGHxASqGztmoYU9trSWKdJnPzhYHXvmfxUeqbvn+Dcq+91UcyHKWZiMjfMCm07D52YF5 2oP6xNkwG+3j33dgspoLd1KgDU4/Rh+gDDq5gjoKdT7Nwz9i44woGxA92oy608ZYDWNIzli5iDw lwmaXmelqkoeUC5bJyC3MmEYS2st32nJUmQO7mA== X-Received: by 2002:ac2:4e97:0:b0:5a8:52de:8637 with SMTP id 2adb3069b0e04-5a852de9213mr518358e87.40.1777548319038; Thu, 30 Apr 2026 04:25:19 -0700 (PDT) MIME-Version: 1.0 References: <202604071230.b5axxf3qna3m@alvherre.pgsql> <227677.1775576304@localhost> In-Reply-To: From: Mihail Nikalayeu Date: Thu, 30 Apr 2026 13:24:41 +0200 X-Gm-Features: AVHnY4I89Tsd6k6vzGFYnClatLqbUUCOoTOaH90LapCN_S91y7KIZf9s9MC2PhM Message-ID: Subject: Re: Adding REPACK [concurrently] To: Amit Kapila Cc: Andres Freund , Antonin Houska , 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 Hello! On Mon, Apr 27, 2026 at 6:25=E2=80=AFAM Amit Kapila wrote: > Alvaro, others, what is your take on this? I agree with you here - we should AT LEAST make that an ERROR instead of an assert and also check it during cache access (not only during the scan because of cache misses). But I think it will still be fragile in case of some extensions installed. Anyway... We also have an issue with correctness right now. I took the old stress test from [0] (the first two) and it fails now, even with the fix from [1] ("Possible premature SNAPBUILD_CONSISTENT with DB-specific running_xacts"). It looks like [1] fixes 008_repack_concurrently.pl, but 007_repack_concurrently.pl fails anyway, including pgbench: error: client 1 script 0 aborted in command 10 query 0: ERROR: could not create unique index "tbl_pkey_repacknew" # DETAIL: Key (i)=3D(383) is duplicated. and 'pgbench: error: pgbench:client 23 script 0 aborted in command 31 query 0: ERROR: division by zero Last one is not MVCC-related; you can see from the logs that it performs something like SELECT (509063) / 0 when the table sum changes. Setting need_shared_catalogs =3D true make them pass, so something is wrong with its correctness. P.S. I think it is good idea to add these stress tests to the source tree, perhaps with some kind PG_TEST_EXTRA=3Dstress (as done in [1]). [0]: https://www.postgresql.org/message-id/flat/CADzfLwUitd5J17O9FUxNGrZBur= OpL6n%2BtnS6dgArXi-i9DNxhg%40mail.gmail.com#c5945a539400676cdfd72eec6c10171= 0 [1]: https://www.postgresql.org/message-id/flat/CAHg%2BQDcQak4jx_6X2_Ws98rz= G%3DxBARLjqm_%3D56wTRUtNsY4DZQ%40mail.gmail.com [2]: https://www.postgresql.org/message-id/flat/CADzfLwWC%2BKxYWb-2QotWaz-q= 1LK8koLNVUR1Q8obAtt%2BR_sORA%40mail.gmail.com#c8435a284f8893bbc1a891c56be5e= 158