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 1vFpQr-001kDh-VL for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Nov 2025 07:56:53 +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 1vFpQp-000fxB-P4 for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Nov 2025 07:56:50 +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 1vFpQp-000fx2-EG for pgsql-hackers@lists.postgresql.org; Mon, 03 Nov 2025 07:56:50 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vFpQl-005hwJ-2y for pgsql-hackers@lists.postgresql.org; Mon, 03 Nov 2025 07:56:50 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-64088c6b309so3549708a12.0 for ; Sun, 02 Nov 2025 23:56:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1762156602; x=1762761402; darn=lists.postgresql.org; h=message-id:date:content-transfer-encoding:mime-version:comments :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mlM9phwd8m1cGVLv/UfGU7wGfUYrr7hM8UPiXWX9ONQ=; b=fTWqypNGbpfRaUzp+TJA2DGXqdydtIPB9Wg3sSakFXbts4D5LC2+sBU9SNbWnzKBSk 0WrgCwObFJcJcFoiZ9X6tChD3M8U+HoHlr/dfQeOTzhsl6O/f14qeqND47/AXvZ4hbT+ qUlQ7oehA+kjrdCLI/j+Eoo32w4cBKycmE8JinmDxR67CUy+zSxNMHEML8N6bfiVYlgy YCFAa6J0k+9yuQYWYKYuzj+M/WeZ4HMA2RWfEzuI5+cbajj2VqEl9wmJoDwXjZxqJ99I TAQp/eExaWrOceSagw/qKIXK3fDqjkc968QmdUJlWeIhxN0YqVOPUF8eGAMwhRJbHFT2 lO7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762156602; x=1762761402; h=message-id:date:content-transfer-encoding:mime-version:comments :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mlM9phwd8m1cGVLv/UfGU7wGfUYrr7hM8UPiXWX9ONQ=; b=harWGs8sScOUV2fZp0zJgDdPHlO1LnpaURJaCF6XaIC7TohR3WahM0OTWfYFXt+aIJ zSgwKdeuC20hENIGG5T2xlKme/1I5W2OXCImUy8rURoVQ8MPwuafquKP7As7HlAKMP4w RrV3S1YXnhttru/52oUtfl3lpDJ7tf+6quqqrQwbdGuLa18clo89PMtWMz2HRtnP1GLo InBuJVZfR84XvUpx8ZPTveiSPXQzerbQ3uTKLWpisKSX9EO+IWTfWz8zt+f8fkYSS3pX MllrbLXtc923cifAi8AQHYsl3PFAVuWoFYrTSqiOFcxSNaEZcXtZDGjQ5ZAYpUrF0SUK UV/A== X-Forwarded-Encrypted: i=1; AJvYcCXgli/jxF5Gc//myUpmnjeoJv+E62gJqnB27ZNn40a4t4uvm1GBCEqcWxnqnK9uUpAoDEuCBu+SjHRIcFgC@lists.postgresql.org X-Gm-Message-State: AOJu0YwWRThUYsvcQutBlnhGN/qpW5SpeBSV7cKpYuEQwktK0uSChhCk NBHZHe/a2ZRIFSIPbAmrN0h2tw6To5QhNuGVGSc0IvMWVT+L2LT1zOrrLoCvW94Cub4smAPWgem 8jWuN6qM= X-Gm-Gg: ASbGncv8zT7gZHQLd8BMOfJU56WKxwO2/Iyb24U4kMBky6AFovPsirsTWfAktFFWo8D 50lyEbZbte3EFs3dkDTUu3f5afoQflOnVrZuNsRhCOA/UvRciJ7jAamRrtsld4RxRll1pdvy8Wf 9v2n/oKxEw88T5UKbHM8SvHBMFmmWzyLvSF8mWTYdhlTzTrdhG5FrLiRgxNyjMMjjbBn5/kuvv+ pFe47yfWNoclaTE84LXvljFRazXKaiq992NC/W+qDmFQUYXSYwSy8UWNG6FDk69vwlJVeWnyZf1 bO3bqqTIew/1ZyFcwELt1b0L2l40JQjKBDk2I6OyTJs9gspAIcdTh+itM21qC4lrN6azb4rCDtr js8vIuXZzgGnLnB+2cW7N3LnCbapzcE7Y5qvANH2A125XSADZTiC1zFt9zEijyafwE6beBD1WCT kb8BZW40mSXHyNlQ== X-Google-Smtp-Source: AGHT+IGG+/8gq8MWYgaHAt4c6Uk69F0j0hBl2FZLkhB+aMMVb2D3nG1a4PZmcJXAeMAX4uFcsE8Dew== X-Received: by 2002:a05:6402:1449:b0:63b:f22d:9254 with SMTP id 4fb4d7f45d1cf-64077015c6bmr9408246a12.23.1762156601623; Sun, 02 Nov 2025 23:56:41 -0800 (PST) Received: from localhost (109-81-168-246.rct.o2.cz. [109.81.168.246]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-640af968e5dsm4389516a12.19.2025.11.02.23.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Nov 2025 23:56:41 -0800 (PST) From: Antonin Houska To: Mihail Nikalayeu cc: Alvaro Herrera , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: References: <202507262156.sb455angijk6@alvherre.pgsql> <202510301734.pj4uds3mqxx4@alvherre.pgsql> Comments: In-reply-to Mihail Nikalayeu message dated "Sat, 01 Nov 2025 19:16:00 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 03 Nov 2025 08:56:40 +0100 Message-ID: <11472.1762156600@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mihail Nikalayeu wrote: > Hello! >=20 > 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. >=20 > > * cluster.c > > * CLUSTER a table on an index. This is now also used for VACUUM = FULL. ok > Should we add something about repack here? >=20 > > ii_ExclusinOps > typo here. ok > > * index is inserted into catalogs and needs to be built later on. > Now it is only in case concurrently =3D=3D true ok > > * Build the index information for the new index. Note that rebuild of > > * indexes with exclusion constraints is not supported, hence there is= no > > * need to fill all the ii_Exclusion* fields. >=20 > Now the function supports its in !concurrently mode. Should we fill > ii_Exclusion? Also, it says >=20 > > If !concurrently, ii_ExclusinOps is currently not needed. > But it is not clear - why not? Right, makeIndexInfo() needs to be adjusted. >=20 > > 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); >=20 > Is it ok we pass isready =3D=3D false if !concurrent? > Also, we pass concurrent =3D=3D true even if concurrently =3D=3D false - = feels > strange and probably wrong. You're right, both arguments are wrong. > > This difference does has no impact on XidInMVCCSnapshot(). > Should it be "This difference has no impact"? ok > > * pgoutput_cluster.c > > * src/backend/replication/pgoutput_cluster/pgoutput_cluster.c > it is pgoutput_trepack.c :) ok I'll fix all the problems in the next version. Thanks! --=20 Antonin Houska Web: https://www.cybertec-postgresql.com