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 1w69nx-0040l6-0s for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 16:13:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w69nv-00AezG-1T for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 16:12:59 +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 1w69nv-00Aez8-0S for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 16:12:59 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w69nt-00000001LPK-3gkj for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 16:12:58 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-486fb439299so21802495e9.0 for ; Fri, 27 Mar 2026 09:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1774627976; x=1775232776; darn=lists.postgresql.org; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kY5P6j0z5MZciLH2O8jSItFrBYn+QUwHwQ2B19/ZDoY=; b=EThHoUbvmpOGoCs92JKZA5f1SkV0WQ2khtI6T5aRS31MnPvoyn0qHQCmZBH17UpVPp sfPjhxSHC6fdmtve+YWYECvUmL8qbFuqInuwq9TmpCdQkMO2JRgcSRlwCOnibpUOMF5J xIwne8ByQKjwAW6fykvsNDmA0Wu7c05TK5Tmq+GBnWieQanewxDLeBZA82qIs2CbShVr TSd27LGNEd2NW1P+3jJqrJXHpC0BTW5m05xwO7mIVsF2JEnFlazkg6o+2TjLNrxqwK44 BnwMeOloXybY5A6Ol40R7d0u5CgratlAJScuVYWiSRCxfYJx/cQeRItzDOF9NKNNcSrx K5PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774627976; x=1775232776; h=message-id:date:content-id:mime-version:comments:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=kY5P6j0z5MZciLH2O8jSItFrBYn+QUwHwQ2B19/ZDoY=; b=IvRoNMkBF1Ug5b45bvbTmk8jFyqldcbZJO2FB49/GYqThQGX3wq8l9tKQZCr+bQbjO FAj1JOF4kxO1jKaHLh07XoCjQONMXtQX6LInOs7AfSIVj6I38muccGn1g/EyKxgyXXWN 6uLedIxUzkFuJ28R+VyGWevUTJW+2B3YqhU8f63vH3oZR2LXnO3j86Y90vRuktpJ2cQs KDEb/tZz8UfkfL+ijopjR72egw/B92tnJF+LqtpRScKRwcPbimXk6QeZQ0hc4fUcVBnK J2Xz86cZ621llIO5+T8ZTLDh0IRrdaC3ZQGcNjX0wUwC9Y2Beyu/m3hdsl1B4FgfFuwO VXhg== X-Forwarded-Encrypted: i=1; AJvYcCUSuOD17JWpCXuiw0ZsJ0GqmLUng2X4pZgkk2IdVq+QTK+SDnFXHDIfDoxol737q+haFxTifOzOqsfvUX9a@lists.postgresql.org X-Gm-Message-State: AOJu0Yyw7NmPAYPho1KTLYpaUbQzmU75Nil3nSrFIfqGTf4OZgDbU/8E TMSNT8yJUQbc6DQxHxiJvNX/dsSCpq+NpUNO26DKonBEHZHTGAB2TqZ9wZeayDCz5v4= X-Gm-Gg: ATEYQzwEL8AmjOr2Ly8+uy0TjbTAidRoqc+AVSbWYOqXPHXCydmv4QRqQM0uJg073Ti zSthDj7uI/u8FAu655zc8e6wSx5DbQDJTCMZsYXbx7cJCS0Vdc4RiNEfT9VKBE1sZXABZRItR88 IX2EGSvzuBssjs1Zlm79aiGjobvR902tRYALQ0p8u0laHMBtP63/g8c7wFJs4aL6nZEKvQsmP3J 9OP6LhQArLVSfDtLtV5jrt5mOt4NLCSdPCC/k5dDYgmB2XpihW5kltA2dsMqBT0WgkijYbsohfd AIUykSIPZEHLGcS5Zpca07UurIlk/xCj/ZSMml/N5FWMQhyznVebwMXWb+Vmntvmb4Gn/pen9P/ X1gVKweEA9s2XFo3XaTykB4/fKK4H7zjWqr0l0EZEGWlMq2MM3nj1+egaMkVemBllQ/K05b6U9b bz+MxbKBsleiPG4HW59Z7eT+hduN0F3tEw2OQI X-Received: by 2002:a05:600c:3e15:b0:486:f9aa:2b57 with SMTP id 5b1f17b1804b1-48727f7be10mr56544695e9.16.1774627976332; Fri, 27 Mar 2026 09:12:56 -0700 (PDT) Received: from localhost (109-81-168-142.rct.o2.cz. [109.81.168.142]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919432f0sm16943490f8f.13.2026.03.27.09.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2026 09:12:55 -0700 (PDT) From: Antonin Houska To: Mihail Nikalayeu Cc: Alvaro Herrera , Srinath Reddy Sadipiralla , Matthias van de Meent , Pg Hackers , Robert Treat Subject: Re: Adding REPACK [concurrently] In-reply-to: <5667.1774513434@localhost> References: <202603191855.fzsgsnyzfvpt@alvherre.pgsql> <5667.1774513434@localhost> Comments: In-reply-to Antonin Houska message dated "Thu, 26 Mar 2026 09:23:54 +0100." X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <90699.1774627975.1@localhost> Date: Fri, 27 Mar 2026 17:12:55 +0100 Message-ID: <90700.1774627975@localhost> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Antonin Houska wrote: > Mihail Nikalayeu wrote: > > src/backend/catalog/index.c:766,1464-1469 > > > > "bool progress = (flags & INDEX_CREATE_REPORT_PROGRESS) != 0;" > > > > AFAIU gin, hash and btree (at least) still just unconditionally write > > PROGRESS_CREATEIDX_* progress. > > I think you're right, I'll check it. I concluded this is a problem that exists for quite a while and should be fixed separately. Currently I don't see conflicts of parameter indexes between PROGRESS_COMMAND_REPACK and PROGRESS_COMMAND_CREATE_INDEX. There would be some if the index was built with the CONCURRENTLY option, but REPACK uses normal index build. I tried to write a patch that allows progress tracking of two commands at the same time (a "main command" and a "subcommand"), but regression tests revealed that contrib/file_fdw is broken in a way that I could not fix easily: during execution of a join, two COPY FROM commands are executed at the same time and they overwrite the status of each other. Unlike the concept of a sub-command, we cannot assume here that the command that started the reporting as the second will stop as the first. Thus in pgstat_progress_end_command() we cannot figure out which node is trying to stop the reporting. It needs more work, I can get back to it after PG 19 feature freeze. -- Antonin Houska Web: https://www.cybertec-postgresql.com