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 1wSzJB-000F6I-0t for pgsql-hackers@arkaria.postgresql.org; Fri, 29 May 2026 15:39:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wSzJ9-0030SO-20 for pgsql-hackers@arkaria.postgresql.org; Fri, 29 May 2026 15:39:36 +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 1wSzJ9-0030SG-14 for pgsql-hackers@lists.postgresql.org; Fri, 29 May 2026 15:39:35 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wSzJ7-00000000A0q-1qA0 for pgsql-hackers@lists.postgresql.org; Fri, 29 May 2026 15:39:35 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-3965eab14cfso3845141fa.0 for ; Fri, 29 May 2026 08:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780069172; cv=none; d=google.com; s=arc-20240605; b=U5KfPk8M0Oguc78/wQrKlVfsDsX/MK/SIIVjGm3XYZcODAkC7FSRi6epr3kotOoaxy GUpU6RafR2poBa95WWDoMx0VxxKlKwIKsWeEQ6FEPXjNyLGv5yx3x2BvoUFs2eErYWpR Blb2QW18X+a/rbXnglGr19DEEHzOqphIyBnWGmqAGkVyL1nH2+rNzg+Lrp5ftQXIa4TV gUr7JZq3bM/jk8LgM/L69O3OeScnbft0ScHlkKQsBuP3xLXjWwrA+LySFjQ3UPTnM9Tq sDjPEvXpnXj+bbwePeYJhxtvBfJBGZaEGdXi66308GCCQ+4HzEqQjemstYmX3oJwY46I mW3w== 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=Wl62IKlG9zHI0lG24cWS2XFcHf3lJKDgSrAZCbbYEiI=; fh=KN9Xre2ZmN6YSJGuxgtzNHGeW2smg5WoJ+QO0dzgzkg=; b=O/UnLC+W/yeIpdadWmyvK6dEwI0vcNJhIsbyqw71WkZtriC9ShkHN8cuWOCJcTyhxM cskJ9NBVh5Yk7fESNFxwASP34RU9qJ7NdzVPKqeZPr8wOTkrLtkLuM43mVM4WQqKFfRV MMiptO45FJfGBh3OYj/F40AO0LNcW4U4/WcQ+FyUNx/9UT/CClpXd0clfyg7DeIVkOYh 4B0jtS3z+zPttNSFtWxP5KwuuksBidcG0G7DY9BmqQ7srF1NeYQb+31oNj6ex8/j5QBg K3Kzt7o+byeWPW4hzWrivSi7gAVrbXU3TEdmJ2nqEEyQ9O4LTt1l6Nh+D5g7WwkNJR/N yEUA==; 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=1780069172; x=1780673972; 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=Wl62IKlG9zHI0lG24cWS2XFcHf3lJKDgSrAZCbbYEiI=; b=eMTeaOzrlrFjtye+eUC8VLGSRcAuMXsjtVe8SDyMc5cJEGobPRftjaJD2bmD2gZo8o Kn7WJP9LkaqVsr9wEXR/78/79CLL/cspTy4rNdoLTSOBgiZD+tzNOuSdgrYoyEPZfqG8 aIwKcRfR2ceKix0/Xq3hitvivWtEyonHwfbJqA+CLJaIhSusoKPwF7BApxZOS5QrhS2a jpTrMyYioY4uhe4v+B2ZzBXh1/4mkdfx1kHU4WDXuXieZHzSC1kBYkjAlWnhhm+QAsWg PWZj3aVFqUKlFQqtadMNc6tO24CkaPC/WIj9Vd7mIbjZcuWEUYvJqJTOGU2msZgMjjB/ kLDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780069172; x=1780673972; 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=Wl62IKlG9zHI0lG24cWS2XFcHf3lJKDgSrAZCbbYEiI=; b=qbs2yMzbVOPaOsqu3UIBrGacey2xQIbAtYvsHXThBUrrWisgqoz95Fe+Ac9TATvvMc N108MknkH9Ook4wU8xdxnVo2cnrOf+c4CbHs3hS3Z3b6oBOEE+DHq6se/HViMx2evXTd hKE56zaIpUKv+TMU0m9bKDsUwytWK9JohbF7RdZQNIIKPxNQ3NLAS3l4a8uG5KvaUciX XIL5rPr6zwn9LHyoaAEziD0GQGL682pwTXvKq8Iju3dQL8hLEl0Xn+AGYq+b/GHuPZlr lDBmCLNCqwaAZ/xEE2Is1h466pYx3x3dsswSNvUiM+gY3xEGla36awlO0/lXs4bniURl HqjQ== X-Forwarded-Encrypted: i=1; AFNElJ9uhX1jae8YI+PMDfU9EwJPeLXia9Z7M6Mht78iTTWTiV90OkP4ulnEmHQ4sSuhSWXBA7k0ZvMYg4LSXpH0@lists.postgresql.org X-Gm-Message-State: AOJu0YwmsRqI985z5qlsfFV99Ozk6QMbW9teUUFugGzo8EKCnD/y8PL9 hsblPdvDni+1Bmj5JUvo47PM3R/7LFzVbL39wAECbKeQdTJ6guVz+9QchBoi2BIkIg40b7FiSFM anaFg1oJv337ip4nrVgmsra2HblZ1q1I= X-Gm-Gg: Acq92OFJrzVSMjZPQFi3fMfMizLq80nfPrFTiPF421mdQ8Mez4Z7WJIHdZbLGNiuDKv +MywQcgebN1mfg+wQO8d+46IgKmWMCEPhEbG3Qiv0CAlfhNVvc4FrUi+1nL/vUOq+8g0IghJwTf Xr0/RkDQY97cZe7+dL6OsY/9f2EBCyAwxGevDQS+/chXYd7CNTjceAJsuTpowVI4VM0J+ddn7nD y8ynqq0tpZE/b34KeIBZlIXvFHEQCr1FLC0QH6SQ+eyPBKXBLgg7bR94sAItyCfmCUqDkFu0ZPh vbvZC3Mpi3gVuqNOCOg+ZapfbIAUqNJrlsqNn2ULxrHb1NA/MhXeIgQyFx5wuKT5mBdjSqajsA5 C4tuq5J/FaVqPxgAl8A== X-Received: by 2002:a05:651c:305a:b0:38e:9eb1:693b with SMTP id 38308e7fff4ca-39664e971ffmr572961fa.3.1780069171771; Fri, 29 May 2026 08:39:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Fri, 29 May 2026 08:39:18 -0700 X-Gm-Features: AVHnY4Kxagn51LTdsfgs7iDHFjZLk7ddSUYfXOdECjWCNjSlEVrr9L4Q-_sVwrE Message-ID: Subject: Re: Adding REPACK [concurrently] To: "Zhijie Hou (Fujitsu)" Cc: Alvaro Herrera , Antonin Houska , "Hayato Kuroda (Fujitsu)" , Srinath Reddy Sadipiralla , Mihail Nikalayeu , 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 On Wed, May 27, 2026 at 10:18=E2=80=AFPM Zhijie Hou (Fujitsu) wrote: > > On Thursday, May 28, 2026 11:34 AM Amit Kapila = wrote: > > On Wed, May 27, 2026 at 5:31=E2=80=AFPM Amit Kapila > > wrote: > > > > > > On Wed, May 27, 2026 at 1:08=E2=80=AFAM Zhijie Hou (Fujitsu) > > > wrote: > > > > > > > > 0001 remains unchanged. > > > > > > > > > > Few minor comments: > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > Commit message says: "This change does not advance catalog_xmin. > > REPACK already holds a snapshot that prevents catalog dead tuple remova= l, > > so catalog_xmin handling can be addressed independently.". > > Isn't it equally important to advance this, otherwise, for long running= REPACKs > > dead tuples will be accumulated needlessly? If so, do we have any ideas= to > > avoid this? > > My understanding is that dead tuple accumulation is common to all long-ru= nning > commands (including CLUSTER, VACUUM FULL, and REPACK without CONCURRENTLY= ). As > long as a command holds a snapshot for a long time while scanning and cop= ying > data, the backend xmin will cause similar accumulation. So, this doesn't = seem > like a new issue to me, and given that catalog_xmin only affect tuples in= system > catalog which is less harmful, I thought it could be handled independentl= y. > There was a proposal to improve this case in [1]. > Fair enough. It makes sense to deal with catalog_xmin separately. > Attaching the v4 patch which improved the comments and commit message as > suggested. > I haven't tested it but otherwise the code changes looks good to me. --=20 With Regards, Amit Kapila.