Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXy1g-0003Au-QE for pgsql-committers@arkaria.postgresql.org; Tue, 04 Jun 2019 01:14:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hXy1e-00046W-En for pgsql-committers@arkaria.postgresql.org; Tue, 04 Jun 2019 01:14:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXy1c-0003x5-Lf for pgsql-committers@lists.postgresql.org; Tue, 04 Jun 2019 01:14:06 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXy1Z-0000k8-9l for pgsql-committers@lists.postgresql.org; Tue, 04 Jun 2019 01:14:04 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 28D1A21C1C; Mon, 3 Jun 2019 21:14:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 03 Jun 2019 21:14:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=2APFgG5QMQ+XC0WCuvpCsm2xq2w w2OAHAXWLAAttvrE=; b=Gq2vM4yoQn4RI7WcZFKSKfwvfHD17ks3NEy0jpy2ydk oooCUPXHATj59tPGFHF0w5V6PU0C/p5aDrOGfFVatw1IXSSEk6PY1K++StPg1OE+ Yfu05wpPev+mNXBw1LBja2Tfto4q+DYi60T/k7Wh/7wFHCW9sITi9b5K0VSP9Ol1 1hXw7kOxRorLLODtif7MoJF/dQqoIlOZn0B58V5lciht/ak72DZTTKBy38F+oxFw OggfjpiYk+ol+KN5irGQabsayrKhYLqQmsbNW8FG8xS8W9Obp7ze1EoXtwtYaobN UaANoIGrlzsKgf/iQoZdQZR4kAARfrlC5GabJsfJYtQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=2APFgG 5QMQ+XC0WCuvpCsm2xq2ww2OAHAXWLAAttvrE=; b=Fo6W3yzhS2wu9wdYYjvYbf 3YdcOBvJOIGVLgR6Zd7165/YIJBbNOPJ4wmNlSUw/XIb1BxqZCn5iqK6oyzWBMdc QghWhqjSGg6Wa/Xs5P4m8+n/nwZWv079rplUXJTu6FoK4pjuywhPHVp3Bmxsi/dB T+i3i/w7ot2RBYeLIqb4ayVhyTHA4v6mXKI034LBEhzMBmPv2ZaY7jTbyUy4HJ7e WTcSgsFwV0i9LKq+hep4ahCBO7s/mZjjIz3+Ee3d8UBY3t9rQX/wFQcsAoobX4dA lJ6ZZ5Pepox6VE9KoGGqGOu+1+ebFyf5dVN4M4qjcQc5QOV6/dBq48JiX4o5m29g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudefkedggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfeehmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucffohhmrghinhepph hoshhtghhrvghsqhhlrdhorhhgnecukfhppeduudekrddvgedurddvgeekrdeivdenucfr rghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienuc evlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (mp76f1f83e.ap.nuro.jp [118.241.248.62]) by mail.messagingengine.com (Postfix) with ESMTPA id A4970380087; Mon, 3 Jun 2019 21:13:58 -0400 (EDT) Date: Tue, 4 Jun 2019 10:13:54 +0900 From: Michael Paquier To: Tom Lane Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix contrib/auto_explain to not cause problems in parallel worke Message-ID: <20190604011354.GD1529@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yudcn1FV7Hsu/q59" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --yudcn1FV7Hsu/q59 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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=3Dwoodlouse&d= t=3D2019-06-04%2000%3A42%3A07&stg=3Dmake 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 --yudcn1FV7Hsu/q59 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlz1xdIACgkQnvQgOdby QH1knw//ewT2IspdMK8EluZKx6Bp+Kpgh2qVQ5xkvgIMD6Jh8d38NDoH30AoAw0f 845SUlxwE/sdmxUfWcrDqD7d+SLNDN8nVYMWOHO37Na20gSrypwrVBjbHctlUPtD Xhxy2haOVOob1ru3XXP4lzLTEoczVBB6+xyZoJz6W5oH43wVaKne7Nb85wFkMZUN zF3GJf5E84mFgzzxf35yQTKugAdmcr6/c93BukDjzD2bj4xLJJwVqTM7SdppiaSx dPSh2HF3hwgXKC2yi8LQwGXQawnYlFYXKDb1SugTbFW8XjrrnGxjgjK8fSkgs6Wn O+ct6W/kLrsjN2GIviyJDbSR2DAlZv+FGFBEBM9K/2b9ku/tYtfrE1bmww1XyJzA +YHxrKE55d8usxWZk0MOJasagIUqcv0YFbt/Q6zMyGUPcendqq84uMBO0O+vRNpC 8LwD0riJtvnzFMu+fXWqRfEpq137usjSaNOLtgvcyIWow3qO0nEY4KpIMX7nmOX4 ba9CaP+zr97uWrXqQ+4HB9ak0I+2RGNHBnRxJJ5+H8svdzs2/elMaWp3hu3RtTfz Il6iEal3eSDNohC9MUkZDTycEcyqDv1lBS6Z6DESVpJioVlcqh8Oa7mv02ob1gQ8 PAXXVsce/RsAfUxUJQlCx9iPwjtRaWD54M+qwUuNSukedouQn9A= =4qY5 -----END PGP SIGNATURE----- --yudcn1FV7Hsu/q59--