Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgk5a-0000pn-HQ for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Mar 2023 10:28:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pgk5X-0008Tz-KR for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Mar 2023 10:28:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pgk5X-0008Tp-6M for pgsql-hackers@lists.postgresql.org; Mon, 27 Mar 2023 10:28:31 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pgk5U-0005Tk-51 for pgsql-hackers@lists.postgresql.org; Mon, 27 Mar 2023 10:28:30 +0000 Received: from mail.postgrespro.ru (webmail.mstn.postgrespro.ru [192.168.2.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 204B721CEE5E; Mon, 27 Mar 2023 13:28:25 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1679912905; bh=gTRDj0zONFOE4stCmihO/XSMh0ILwalXCKwCXPHXjUw=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=TdOenn9+FcX2pptUwxILG9C3DNpm6VI09cnP4Z+NGWbxgkjHNgOxhFi8kkiqbUp5n W0uZE6yHVdr+bpJLsNLcRuCdp8lyODe8y5j1h922R/7eOCp9KdrIvMWLmb/VpdXaOS ffQ7TWoUf7Cic3sB6QhG9zwLvrQPZv4KPRrXtVCc= MIME-Version: 1.0 Date: Mon, 27 Mar 2023 13:28:24 +0300 From: Alexander Pyhalov To: Justin Pryzby Cc: Ilya Gladyshev , pgsql-hackers@lists.postgresql.org, Masahiko Sawada , Michael Paquier , =?UTF-8?Q?=E6=9D=8E=E6=9D=B0=28?= =?UTF-8?Q?=E6=85=8E=E8=BF=BD=29?= , =?UTF-8?Q?=E6=9B=BE=E6=96=87=E6=97=8C=28=E4=B9=89=E4=BB=8E=29?= , Alvaro Herrera Subject: Re: CREATE INDEX CONCURRENTLY on partitioned index In-Reply-To: References: <20210128143013.GC7450@telsasoft.com> <20210226182019.GU20769@telsasoft.com> <04657227cc37b6353cf0c72bedac70cc@postgrespro.ru> <20220628183309.GD28130@telsasoft.com> <20221121030011.GU11463@telsasoft.com> <5bafee07d0e1b3ce5359d1656c90b4836d7cb6a1.camel@gmail.com> <20221204190935.GD14156@telsasoft.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: a.pyhalov@postgrespro.ru Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby писал 2023-03-26 17:51: > On Sun, Dec 04, 2022 at 01:09:35PM -0600, Justin Pryzby wrote: >> This currently handles partitions with a loop around the whole CIC >> implementation, which means that things like WaitForLockers() happen >> once for each index, the same as REINDEX CONCURRENTLY on a partitioned >> table. Contrast that with ReindexRelationConcurrently(), which >> handles >> all the indexes on a table in one pass by looping around indexes >> within >> each phase. > > Rebased over the progress reporting fix (27f5c712b). > > I added a list of (intermediate) partitioned tables, rather than > looping > over the list of inheritors again, to save calling rel_get_relkind(). > > I think this patch is done. Hi. Overall looks good to me. However, I think that using 'partitioned' as list of partitioned index oids in DefineIndex() is a bit misleading - we've just used it as boolean, specifying if we are dealing with a partitioned relation. -- Best regards, Alexander Pyhalov, Postgres Professional