Thanks for rebasing. I took a look and have some high level comments.
1/ The way the patches stand now, different parallel commands will result in a different formatted log line. This may be OK for reading the logs manually, but will be hard to consume via tools that parse logs and if we support other parallel commands in the future. Thinking about this further, it seems to me this logging only makes sense for parallel query and not maintenance commands. This is because for the latter case, the commands are executed manually and a user can issue VACUUM VERBOSE ( for the case of vacuum ). For CREATE INDEX, one can enable DEBUG1. For example: postgres=# CREATE INDEX tbl_c1 ON tbl(c1); DEBUG: building index "tbl_c1" on table "tbl" with request for 1 parallel workers DEBUG: index "tbl_c1" can safely use deduplication CREATE INDEX It does appear though the debug1 message is missing the number of workers actually used, but this could be taken up in a separate discussion. 2/ For logging parallel query workers, the log line could be simpler. Instead of: + elog(LOG, "%i parallel nodes planned (%i obtained all their workers, %i obtained none), " + "%i workers planned to be launched (%i workers launched)", what about something like: "launched %d parallel workers (planned: %)" For example, if I have 2 gather nodes and they each plan and launch 2 workers, the log line should be as simple as "launched 4 parallel workers (planned: 4)" This behavior in which workers planned and launched are aggregated in the log can be described in the documentation. 3/ Also, log_parallel_query_workers as the name of the GUC will make more sense if we go logging parallel query only. What do you think? Regards, Sami Imseih Amazon Web Services (AWS) On Thu, Dec 26, 2024 at 8:25 AM Benoit Lobréau <benoit.lobr...@dalibo.com> wrote: > > This is just a rebase. > > As stated before, I added some information to the error message for > parallel queries as an experiment. It can be removed, if you re not > convinced. > > --- > Benoit Lobréau > Consultant > http://dalibo.com