RE: pgstat_report_activity() and parallel CREATE INDEX (was: Parallel index creation & pg_stat_activity)
Phil Florent <philflorent@hotmail.com>
From: Phil Florent <philflorent@hotmail.com>
To: Robert Haas <robertmhaas@gmail.com>, Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-03-29T17:38:07Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Set debug_query_string in worker_spi.
- d2246cde825e 14.0 landed
-
Reproduce debug_query_string==NULL on parallel workers.
- 045466675820 11.10 landed
- 741b84e9f747 12.5 landed
- ab2e2ce46668 13.1 landed
- f90e80b91383 14.0 landed
-
Logical replication support for TRUNCATE
- 039eb6e92f20 11.0 cited
-
Call pgstat_report_activity() in parallel CREATE INDEX workers.
- 7de4a1bcc56f 11.0 landed
Thanks, ran the original test and it works great after the patch. Phil ________________________________ De : Robert Haas <robertmhaas@gmail.com> Envoyé : jeudi 22 mars 2018 18:17 À : Peter Geoghegan Cc : Andres Freund; Phil Florent; PostgreSQL Hackers Objet : Re: pgstat_report_activity() and parallel CREATE INDEX (was: Parallel index creation & pg_stat_activity) On Wed, Mar 7, 2018 at 8:53 PM, Peter Geoghegan <pg@bowt.ie> wrote: > On Thu, Mar 1, 2018 at 2:47 PM, Peter Geoghegan <pg@bowt.ie> wrote: >> No. Just an oversight. Looks like _bt_parallel_build_main() should >> call pgstat_report_activity(), just like ParallelQueryMain(). >> >> I'll come up with a patch soon. > > Attached patch has parallel CREATE INDEX propagate debug_query_string > to workers. Workers go on to use this string as their own > debug_query_string, as well as registering it using > pgstat_report_activity(). Parallel CREATE INDEX pg_stat_activity > entries will have a query text, too, which addresses Phil's complaint. Committed. Thanks for the patch. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company