Re: Parallel index creation & pg_stat_activity

From: Andres Freund <andres(at)anarazel(dot)de>
To: Phil Florent <philflorent(at)hotmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Parallel index creation & pg_stat_activity
Date: 2018-02-28 17:44:52
Message-ID: 20180228174452.6hudsl6lt2l2lozh@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi Peter,

On 2018-02-28 16:50:44 +0000, Phil Florent wrote:
> With an index creation (create index t1_i1 on t1(c1, c2);) I have this kind of output :
>
> ./t -d 20 -o "pid, backend_type, query, wait_event_type, wait_event"
> busy_pc | distinct_exe | pid | backend_type | query | wait_event_type | wait_event
> ---------+--------------+------+----------------+-----------------------------------+-----------------+--------------
> 68 | 1 / 136 | 8262 | client backend | create index t1_i1 on t1(c1, c2); | IO | DataFileRead
> 26 | 1 / 53 | 8262 | client backend | create index t1_i1 on t1(c1, c2); | |
> 6 | 1 / 11 | 8262 | client backend | create index t1_i1 on t1(c1, c2); | IO | BufFileWrite
> (3 rows)

> No parallel worker. At least one parallel worker was active though, I could see its work with a direct query on pg_stat_activity or a ps -ef :
>
> ...
> postgres 8262 8230 7 08:54 ? 00:22:46 postgres: 11/main: postgres postgres [local] CREATE INDEX
> ...
> postgres 9833 8230 23 14:17 ? 00:00:33 postgres: 11/main: parallel worker for PID 8262
> ...

Looks like we're not doing a pgstat_report_activity() in the workers?
Any argument for not doing so?

Greetings,

Andres Freund

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Charles Clavadetscher 2018-02-28 21:00:57 Re: How to avoid trailing zero (after decimal point) for numeric type column
Previous Message Phil Florent 2018-02-28 16:50:44 Parallel index creation & pg_stat_activity

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2018-02-28 18:08:56 [PATCH] Verify Checksums during Basebackups
Previous Message Grigory Smolkin 2018-02-28 17:25:38 Re: Changing the autovacuum launcher scheduling; oldest table first algorithm