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.94.2) (envelope-from ) id 1vFG9h-009qFr-By for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Nov 2025 18:16:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vFG9f-006Z4a-2V for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Nov 2025 18:16:46 +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.94.2) (envelope-from ) id 1vFG9e-006Z4R-ON for pgsql-hackers@lists.postgresql.org; Sat, 01 Nov 2025 18:16:45 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vFG9a-005SC4-2P for pgsql-hackers@lists.postgresql.org; Sat, 01 Nov 2025 18:16:44 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-378e8d10494so31560681fa.2 for ; Sat, 01 Nov 2025 11:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762021001; x=1762625801; 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=x9MQWADemzqKA/13ohcDSYmk5JJ6bkg6twRrC5gfsxY=; b=RsTX4WanWnWj/QpHwtGSSWeJ2VFIpWAgLfzhRSr4CiGf8tiyOeHI/QXu8LZgGKEo3X HkSB/EGuggku7y6mp8X33vSjDCEVWaWcf9OZucL/ADJxgT5NI0nj/cEsT9ziOeU76cIj vtGYUUy4LoCkLTMWTruC3UT3JKXnJsACbmr1llPKtq3KN63qXLBe7lXMuiHnnvbBVJay L7nYHBInkPcb2j5K5UAb5AyjgFJEWx1qpEwKMDtV+i1sTOUSFQ7PKp3iPLDh9TGbog0X kGYddHGVl1mxK+e0Y3HPAMNnOW2m7p9Lhf2v38KEvRluT/edOnyGMK52ePdEszHNy+7Y X9MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762021001; x=1762625801; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x9MQWADemzqKA/13ohcDSYmk5JJ6bkg6twRrC5gfsxY=; b=Gg/CcknYvEA628rusrd1h4WZXsNtPY4x5JvAksvdAotzPvwuNufvm+QgRznRrKipIk wW+RHav92T5D/egAhO8EC8sXKtfPTicnDxLpkS7AAW1BW5R8NH9Ah/MJHElh/nhEvAhk Z/nepXFVJVelmqvZOj43oI8Cq3HrW5VKmeMEqv7WI3hWDkchiylAaRYuEaZ4Uc8/MAUx grKlhqW3EKFxU84GW+F4ttLdVFU//XuSXxEOgNcpfU2q394WOTb8kII6JbOXcBOEjLnj m4ipHAngQjJbE6jKbBCK2FMFlmknvcduMaKxO/7dqG+WCXtsZy8+JsTdtz8fu/MYOdky mWpQ== X-Gm-Message-State: AOJu0Yz6xJ5qrBtmU0NFJEIiZOaAuiqIKeWdIHu8LNhCCi1wisZ53Eml uJsUNSeVO3dKcYRUJeHD6lC7FD4+J0Ym2Jbc0OGuqkEH1Zrc5f+T0t2MI/O6LbedXWsXkGD6x9p agIcyPU2AB8kb/v3yTic7UiMzYJxISZ4= X-Gm-Gg: ASbGncueCRr0hT7hIpzBpnWWCJYKUGIX7k+nTRus4z3Brig2ec4zQjhe9vF44sUbmnG obnVdCa0WMLEX+FsTLevKDP5AKBxxADgJyd1k8+z75+9bWV/IkYyPDJSosdTCE0B2gdnKwUnoNd pRZWrmvq4hh7a4T1TopR5OJziqP6g4hPUEAdu5FrHN790s5Dd1S0+N0KT+xiw/Zr8tSDKwLL88V Bi0yCvMWIiTFa9Nngrg+JaS4I0RmofSztK5tLT68b7Cadmc+urdl5wAMrbg X-Google-Smtp-Source: AGHT+IG3tTTR9mc/d+KwA8FvQ7nDBTOIqmJdz1M1DmWLayg23EsH8pbBBRRuQ0GyuFQyZmH0JFpGmWxraDs9ji6Nfn4= X-Received: by 2002:a05:6512:234c:b0:592:f54d:8657 with SMTP id 2adb3069b0e04-5941d513857mr2643128e87.19.1762021001040; Sat, 01 Nov 2025 11:16:41 -0700 (PDT) MIME-Version: 1.0 References: <202507262156.sb455angijk6@alvherre.pgsql> <202510301734.pj4uds3mqxx4@alvherre.pgsql> In-Reply-To: <202510301734.pj4uds3mqxx4@alvherre.pgsql> From: Mihail Nikalayeu Date: Sat, 1 Nov 2025 19:16:00 +0100 X-Gm-Features: AWmQ_bmoJDvvHPD3Plypv72MsuE7S2StIptDWDJ3eQC3k-LQt72GSlD8m5Guljw Message-ID: Subject: Re: Adding REPACK [concurrently] To: Alvaro Herrera Cc: Pg Hackers , Antonin Houska , 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 Fri, Oct 31, 2025 at 12:17=E2=80=AFAM Alvaro Herrera wrote: > Here's a new installment of this series, v25, including the CONCURRENTLY > part, which required some conflict fixes on top of the much-changed > v24-0001 patch. > * cluster.c > * CLUSTER a table on an index. This is now also used for VACUUM FU= LL. Should we add something about repack here? > ii_ExclusinOps typo here. > * index is inserted into catalogs and needs to be built later on. Now it is only in case concurrently =3D=3D true > * Build the index information for the new index. Note that rebuild of > * indexes with exclusion constraints is not supported, hence there is n= o > * need to fill all the ii_Exclusion* fields. Now the function supports its in !concurrently mode. Should we fill ii_Exclusion? Also, it says > If !concurrently, ii_ExclusinOps is currently not needed. But it is not clear - why not? > newInfo =3D makeIndexInfo(oldInfo->ii_NumIndexAttrs, > oldInfo->ii_NumIndexKeyAttrs, > oldInfo->ii_Am, > indexExprs, > indexPreds, > oldInfo->ii_Unique, > oldInfo->ii_NullsNotDistinct, > false, /* not ready for inserts */ > true, > indexRelation->rd_indam->amsummarizing, > oldInfo->ii_WithoutOverlaps); Is it ok we pass isready =3D=3D false if !concurrent? Also, we pass concurrent =3D=3D true even if concurrently =3D=3D false - fe= els strange and probably wrong. > This difference does has no impact on XidInMVCCSnapshot(). Should it be "This difference has no impact"? > * pgoutput_cluster.c > * src/backend/replication/pgoutput_cluster/pgoutput_cluster.c it is pgoutput_trepack.c :) Best regards, Mikhail.