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 1sHiDS-00AGR6-HT for pgsql-docs@arkaria.postgresql.org; Thu, 13 Jun 2024 11:02:02 +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 1sHiDQ-00HDZ1-7Y for pgsql-docs@arkaria.postgresql.org; Thu, 13 Jun 2024 11:02:01 +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 1sHiDP-00HDYb-Sr for pgsql-docs@lists.postgresql.org; Thu, 13 Jun 2024 11:02:00 +0000 Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHiDN-001SPr-U4 for pgsql-docs@lists.postgresql.org; Thu, 13 Jun 2024 11:02:00 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 68D2A114014F; Thu, 13 Jun 2024 07:01:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 13 Jun 2024 07:01:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718276516; x= 1718362916; bh=qs8WPHjCc7LDmAmzTh5SLcUdR3gSm2rGhsBBuYKCXrE=; b=B tMZrLunjjWcVppdxUYg+oY+2OE71G3ElCAp/iU2PntQW64uyNIVnqBecXHlF6fx1 21sM12EF0G6ZsmD4WkJ3srx9xti1EpE7YdkLqSsvydpNqoTa7SidSYh+SvMLmXZC yxHnhDgVMeO0Qn+P5eLibi0Pe4h4hPFWuCT98VhoVEzGOozuprxGs5yHIMp/2NnN X4gzRs5pBJts5XociW2H2UgUGar6N7/PZ/wkiUg/gzWSbMLAZoRW028T3eURNde5 BVW7vcRf1tJUW/RR0URJlyK7SO4KxPSpcw0ZxAvRpn5TDZ0wNAiFRneO0jIrO+tg zhQLBikxjEi2bhSk8KSXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepkedthfekveduuefgueelteekgfejgeekueduudeuveeu vddufffggfetiefhvdefnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpvg hnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 07:01:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1718276513; bh=p92rJpanSqGKNlIxZeq+V21fzVBTgRm9zLtBk49t6h4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=VXm5J68yzlhQsS+oBujZf0usPJw1Hx7P76wHP+4CKuE4GM09jnFWFeiUVBm3rz5/N tZcIh2l7xs0U9AE5+ne0LHDqb3cRMtooo5HualQu9TOciiBvioqbfGNvzgbDvvQVze gh58lb36Ujg4fshz7FEoc+cYKc1TFyIcgjkwOqGozr/rLW4o6SYRxngGWQsQlxiSr0 d5Cohd9xVxTHcGcRpfcmsl2Ts3C2trwJ7pUYHz3B+QhKFj0KY83yDBNco8GYHK4vnj ojh4rb02RQknUrc4QxFIiTLCnsQzC3FSoHGuU2ZcyhHHLgS+O2iBi8kl+gOPU8ynwn q6TwMA2o11rBw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 6C4F5527; Thu, 13 Jun 2024 04:01:53 -0700 (PDT) Date: Thu, 13 Jun 2024 13:01:53 +0200 From: Alvaro Herrera To: Euler Taveira Cc: eve.fritz@qonto.com, pgsql-docs@lists.postgresql.org Subject: Re: 28.4.4. Progress Reporting phase status Message-ID: <202406131101.bgpkh56xdvem@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0754dc58-c0b9-4193-a48a-ca031da37147@app.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Jun-03, Euler Taveira wrote: > On Thu, May 30, 2024, at 12:50 PM, PG Doc comments form wrote: > > I noticed that in "28.4.4. Progress Reporting" chapter for > > `pg_stat_progress_create_index`, the "Table 28.43. CREATE INDEX Phases" may > > be misleading as phase displayed for "building index" is often more > > detailed. > > I found in this presentation[1] (slide 20) what seems to be the exact status > > displayed by the table while creating the index. > > Maybe documentation table displaying all status could be extended to display > > the following status: > > The description is accurate. Since this step (building index) is AM-specific, it > shouldn't contain the additional information (after the semicolon). However, maybe Eve is right that we should have these steps: > > - building index: initializing [2] > > - building index: scanning table > > - building index: sorting live tuples > > - building index: sorting dead tuples > > - building index: loading tuples in tree somewhere in the AM-specific doc pages, https://www.postgresql.org/docs/devel/btree.html and perhaps we can link to that from the progress-report chapter. (Not really related, but: I think the per-index-AM subsections in https://www.postgresql.org/docs/devel/indexes-types.html should have forward-links to the appendix sections on them.) > You can certainly obtain the build phases from all access > methods with a query like: > > WITH amidx AS ( > SELECT oid, amname FROM pg_am WHERE amtype = 'i') > SELECT a.amname, pg_indexam_progress_phasename(a.oid, i) > FROM amidx a, generate_series(0, 100) i > WHERE pg_indexam_progress_phasename(a.oid, i) IS NOT NULL > ORDER BY a.amname, i; Heh, only btrees show up there. Sad. I wonder to what extent would it be useful for the other index AMs to report sub-phases of index creation. It should be pretty simple to implement ... -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "La gente vulgar sólo piensa en pasar el tiempo; el que tiene talento, en aprovecharlo"