pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Euler Taveira <euler@eulerto.com>
Cc: eve.fritz@qonto.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: 28.4.4. Progress Reporting phase status
Date: Thu, 13 Jun 2024 13:01:53 +0200
Message-ID: <202406131101.bgpkh56xdvem@alvherre.pgsql> (raw)
In-Reply-To: <0754dc58-c0b9-4193-a48a-ca031da37147@app.fastmail.com>

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"





view thread (3+ messages)

Message-ID: <202406131101.bgpkh56xdvem@alvherre.pgsql>
Permalink:  ../202406131101.bgpkh56xdvem@alvherre.pgsql/
Also on:    postgresql.org/message-id/202406131101.bgpkh56xdvem@alvherre.pgsql

 · 

reply

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: alvherre@alvh.no-ip.org, euler@eulerto.com, eve.fritz@qonto.com, pgsql-docs@lists.postgresql.org
  Subject: Re: 28.4.4. Progress Reporting phase status
  In-Reply-To: <202406131101.bgpkh56xdvem@alvherre.pgsql>

* 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