Re: improve DEBUG1 logging of parallel workers for CREATE INDEX? - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: improve DEBUG1 logging of parallel workers for CREATE INDEX?
Date
Msg-id Z36X44q1wTi0HNSb@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
List pgsql-hackers
Hi,

On Fri, Jan 03, 2025 at 12:30:14PM -0600, Sami Imseih wrote:
> While reviewing patch [1], I realized that the DEBUG1 message
> for CREATE INDEX could do better in providing information
> about parallel workers launched. Currently, the message just
> shows how many workers are planned, but a user may want
> to ensure that they have the appropriate number of workers
> launched as well when they enable DEBUG1 logging.

Yeah, one could see how many workers are currently running but would not be
able to figure out once the index is created. So adding the info in the log
makes sense to me.

> I prepared a simple patch, attached, for this. The log message matches
> the format
> used in VACUUM VERBOSE ( for consistency sake ).

A few random comments:

=== 1

s/parallel vacuum workers for index vacuuming/parallel workers for index creation/?

(2 times)

=== 2

-  (errmsg_internal("building index \"%s\" on table \"%s\" with request for %d parallel workers",
+  (errmsg_internal("building index \"%s\" on table \"%s\"",

I'd add "in parallel" to match its counterpart "serially" above. That would
make it more clear in case one just look for "building index" in the log.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: ecpg command does not warn COPY ... FROM STDIN;
Next
From: jian he
Date:
Subject: using PGOPTIONS in meson