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 1uYkWk-00AbBQ-5u for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Jul 2025 12:00:54 +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 1uYkWi-001Wgs-AW for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Jul 2025 12:00:52 +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.94.2) (envelope-from ) id 1uYkWh-001Wgi-SX for pgsql-hackers@lists.postgresql.org; Mon, 07 Jul 2025 12:00:52 +0000 Received: from mail-ua1-x931.google.com ([2607:f8b0:4864:20::931]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uYkWg-00625E-2E for pgsql-hackers@postgresql.org; Mon, 07 Jul 2025 12:00:51 +0000 Received: by mail-ua1-x931.google.com with SMTP id a1e0cc1a2514c-87f2aed4092so884883241.2 for ; Mon, 07 Jul 2025 05:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751889650; x=1752494450; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Bd2j6gngZXSJ53CeKnWng03KwVoworBEOtxWS+c3Dkw=; b=f+XULoVF0wUouiRKcWPmDFh4CgC3LtZ1cXj1LXHsnM+m45uOq2zK6oE+Chu/owDNN1 /O1eSFRpo7q3EbpWt9VHBnGqrnkulYI+0q33m3wDYyrPBzCgHokWSOKv5V1nShRno5N1 YMB7/9NUlW3nw4Lvfee9+7v5RI9i1vIO2U36rPsTpZx4W428a4XzYI2UVcVaiPFHjgyn XZ32lMRw/awzplmWcZeB0iRb+UfyvEDwVl49xuVYxPGhYnegjLkuqWfLCfqc6JwzPKT9 2LPuRuLenjwvi2JbxR8kMmxEw8DKHp2YAhZAHKlsai//xBpyVyFKWm+KCuAeZ/IVIaiS ywiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751889650; x=1752494450; h=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=Bd2j6gngZXSJ53CeKnWng03KwVoworBEOtxWS+c3Dkw=; b=cYeM3sv5zrmFSQ8XbXU6U3TNKs63gNfIH1zUGuJedDAbRUkjp6DC3dGn3dZRMcDhQ2 HyVucqsDqXLeSKtxvkgRmEkWiBJnaGYrtkEfdVQBuqbr2CmVSUjqOHCXuYOWDuqNl4fB 0VsJKhKD1jW8KR3Q1I62KEwNbrNqwRQ1SfDkmKluzUifYkx8/HG+Rs/yHrJPlamiKLKS e5vbRa+ZSV97DUFxKUJTuA3vnZ98skxU1SDdzdGG2Pct6A5eo0migtAaIrACj8WCLl16 AOSE8GVXG2bjxvC+DHZXMEkHs9fMFqK0sN18ERWQaU+lD7i5kquD+zLTVIHLunAXhlgH +v2w== X-Forwarded-Encrypted: i=1; AJvYcCVtXDh87yTT0pWnOjpxWli1ScHG5fR4qPc2jJp6hKDnNg301WXbkgMZLVGJaAMQ61LcezQKfhYBPbm4t97/@postgresql.org X-Gm-Message-State: AOJu0YztKaOVeBMV00pK32U3L5sDIbgXiHN3w4F8S+N7MrJubt5GKogp stlIRe3mpGlN+r8TXjtyn9th4b0qvhLzVXbie434bYkydD3v0ZIZO1y6zd+pxIkyrWhcxS4b9tX QaJ3mKMQse62HVbte9nqVNOeJwh1j+Us= X-Gm-Gg: ASbGncsyb/4IlZv/iyXDUBEGVMdrq1ZoTHJu8sb6pc7MoJayJ5/67xgo5aI+peWcktu FeSUNRUrIb6F6OPvX4apD0ilroKvYFb2KZekUOl6g7Vm06NhzpvRbGq1m0VcHTpStSX7q7rlQih XcdOkyS/yjQGWZIWVOV19g6Z7pt6Y9J07pzsUCv4fR73zKkwegaGqk/KY= X-Google-Smtp-Source: AGHT+IGQ5noukJL0HusviLTnG6riSJeLTb8rUwEt9d8/J7q2cwK2YcDtyJAIdCEWfVbLWc2UYCiOEU/+T43mHOcbgbU= X-Received: by 2002:a05:6102:5813:b0:4e6:f8b0:2dfc with SMTP id ada2fe7eead31-4f305b4e39dmr3762750137.14.1751889649065; Mon, 07 Jul 2025 05:00:49 -0700 (PDT) MIME-Version: 1.0 References: <202505181556.3n6oiowvntyr@alvherre.pgsql> In-Reply-To: From: Sergey Sargsyan Date: Mon, 7 Jul 2025 15:00:37 +0300 X-Gm-Features: Ac12FXz--opPUfO0W0WXOHnMejY_vCiffXIXNaKn9SujEkxzZ_X4v-gyDdxkcy4 Message-ID: Subject: Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements To: Mihail Nikalayeu Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Andres Freund , Michael Paquier , PostgreSQL Hackers , Andrey Borodin , Melanie Plageman , Matthias van de Meent Content-Type: multipart/alternative; boundary="00000000000037e41d063955988d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000037e41d063955988d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I=E2=80=99ve tested the patch across several thousand test cases, and no fa= ults of any kind have been observed. Additionally, I independently built a closed banking transaction system to verify consistency during REINDEX CONCURRENTLY while multiple backends were writing simultaneously. The results showed no missing transactions, and the validation logic worked exactly as expected. On large tables, I observed a significant speedup=E2=80=94often several times faster. I believe this patch is highly valuable, as REINDEX CONCURRENTLY is a common maintenance operation. I also noticed that there is a separate thread working on adding support for concurrent reindexing of partitioned indexes. Without this patch, that feature would likely suffer from serious performance issues due to the need to reindex many indexes in one go=E2=80= =94making the process both time-consuming and lock-intensive. Best regards, S On Thu, Jul 3, 2025, 3:24=E2=80=AFAM Mihail Nikalayeu wrote: > Hello! > > Rebased again, patch structure and comments available here [0]. Quick > introduction poster - here [1]. > > Best regards, > Mikhail. > > [0]: > https://www.postgresql.org/message-id/flat/CADzfLwVOcZ9mg8gOG%2BKXWurt%3D= MHRcqNv3XSECYoXyM3ENrxyfQ%40mail.gmail.com#52c97e004b8f628473124c05e3bf2da1 > [1]: > https://www.postgresql.org/message-id/attachment/176651/STIR-poster.pdf > --00000000000037e41d063955988d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I=E2=80=99ve tested the patch across several thousand tes= t cases, and no faults of any kind have been observed.
Additionally, I independently built a closed banking t= ransaction system to verify consistency during REINDEX CONCURRENTLY while m= ultiple backends were writing simultaneously. The results showed no missing= transactions, and the validation logic worked exactly as expected. On larg= e tables, I observed a significant speedup=E2=80=94often several times fast= er.

I believe this patch= is highly valuable, as REINDEX CONCURRENTLY is a common maintenance operat= ion. I also noticed that there is a separate thread working on adding suppo= rt for concurrent reindexing of partitioned indexes. Without this patch, th= at feature would likely suffer from serious performance issues due to the n= eed to reindex many indexes in one go=E2=80=94making the process both time-= consuming and lock-intensive.

Best regards,=C2=A0
S

On Thu, Jul 3, 2025, 3:24=E2=80=AFAM Mihail Nikalayeu <mihailnikalayeu@gmail.com> wrote:
=
Hello!

Rebased again, patch structure and comments available here [0]. Quick
introduction poster - here [1].

Best regards,
Mikhail.

[0]: https://www= .postgresql.org/message-id/flat/CADzfLwVOcZ9mg8gOG%2BKXWurt%3DMHRcqNv3XSECY= oXyM3ENrxyfQ%40mail.gmail.com#52c97e004b8f628473124c05e3bf2da1
[1]: https://www.p= ostgresql.org/message-id/attachment/176651/STIR-poster.pdf
--00000000000037e41d063955988d--