Re: pgsql: Fix contrib/auto_explain to not cause problems inparallel worke - Mailing list pgsql-committers

From Michael Paquier
Subject Re: pgsql: Fix contrib/auto_explain to not cause problems inparallel worke
Date
Msg-id 20190604011354.GD1529@paquier.xyz
Whole thread Raw
In response to pgsql: Fix contrib/auto_explain to not cause problems in parallelworke  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Fix contrib/auto_explain to not cause problems in parallel worke  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Hi Tom,

On Mon, Jun 03, 2019 at 10:06:21PM +0000, Tom Lane wrote:
> Fix contrib/auto_explain to not cause problems in parallel workers.
>
> A parallel worker process should not be making any decisions of its
> own about whether to auto-explain.  If the parent session process
> passed down flags asking for instrumentation data, do that, otherwise
> not.  Trying to enable instrumentation anyway leads to bugs like the
> "could not find key N in shm TOC" failure reported in bug #15821
> from Christian Hofstaedtler.

This has broken the builds on Windows for 9.6 and 10:
https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=woodlouse&dt=2019-06-04%2000%3A42%3A07&stg=make

Here is the failure:
auto_explain.obj : error LNK2001: unresolved external symbol
ParallelWorkerNumber [C:\buildfarm\buildenv\REL_10_STABLE\pgsql.build\auto_explain.vcxproj]

This gets included as a dependency because of the call to
IsParallelWorker() you have added in this commit, and I think that
this can be fixed by adding PGDLLIMPORT to the variable in
parallel.h.  Would you fix it or should I?
--
Michael

Attachment

pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix some typos and inconsistencies in tableam.h
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Fix contrib/auto_explain to not cause problems in parallel worke