From: Euler Taveira <euler@eulerto.com>
To: eve.fritz@qonto.com
To: pgsql-docs@lists.postgresql.org
Subject: Re: 28.4.4. Progress Reporting phase status
Date: Mon, 03 Jun 2024 17:15:25 -0300
Message-ID: <0754dc58-c0b9-4193-a48a-ca031da37147@app.fastmail.com> (raw)
In-Reply-To: <171708424943.2021730.15027954353131825880@wrigleys.postgresql.org>
References: <171708424943.2021730.15027954353131825880@wrigleys.postgresql.org>
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).
> - building index: initializing [2]
> - building index: scanning table
> - building index: sorting live tuples
> - building index: sorting dead tuples
> - building index: loading tuples in tree
This is the B-tree build phases. Although, the other access methods (such as
Hash, Gin, GiST, BRIN) do not provide a function to report the current building
phase, it might be added in the future. I'm not sure if it is worth adding such
information here. 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;
--
Euler Taveira
EDB https://www.enterprisedb.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: euler@eulerto.com, eve.fritz@qonto.com, pgsql-docs@lists.postgresql.org
Subject: Re: 28.4.4. Progress Reporting phase status
In-Reply-To: <0754dc58-c0b9-4193-a48a-ca031da37147@app.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox