Re: pgstat_report_activity() and parallel CREATE INDEX (was: Parallel index creation & pg_stat_activity)
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>, Phil Florent <philflorent@hotmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-10-25T05:18:36Z
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
Attachments
- null-debug_query_string-v1.patch (text/plain) patch v1
- worker_spi-debug_query_string-v1.patch (text/plain) patch v1
On Sat, Oct 17, 2020 at 08:39:35AM -0700, Peter Geoghegan wrote: > On Tue, Oct 13, 2020 at 7:26 PM Noah Misch <noah@leadboat.com> wrote: > > 1. Disable parallelism for the index build under ExecuteTruncateGuts(). > > Nobody will mourn a performance loss from declining parallelism for an > > empty index, but I feel like this is fixing in the wrong place. > > 2. Make _bt_begin_parallel() and begin_parallel_vacuum() recognize the > > debug_query_string==NULL case and reproduce it on the worker. > > 3. Require bgworkers to set debug_query_string before entering code of vacuum, > > truncate, etc. Logical replication might synthesize a DDL statement, or it > > might just use a constant string. > > > > I tend to prefer (2), but (3) isn't bad. Opinions? > > I also prefer 2. Thanks. Here is the pair of patches I plan to use. The second is equivalent to v0; I just added a log message.