Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDoCw-0002Cx-TQ for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Jul 2022 14:28:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oDoCu-0000FP-SS for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Jul 2022 14:28:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDoCu-0000CV-Hd for pgsql-hackers@lists.postgresql.org; Tue, 19 Jul 2022 14:28:16 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDoCr-0001DJ-3c for pgsql-hackers@lists.postgresql.org; Tue, 19 Jul 2022 14:28:16 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D4D9B5C0180; Tue, 19 Jul 2022 10:28:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 19 Jul 2022 10:28:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1658240890; x=1658327290; bh=2 7WZDsQ2ZQzgSrm4dZTVpjSUeVdVAOdImtZ+he/VJjA=; b=wk857XMu53Dr3PmrO M6UBBrnC7lz/AOgdhLzU3wHilu1jKUgFxacOXaJah5nA6yd/SYl/w/zgtiEB+pBz B/oXD85vEcjWz0luMG1+IMXNyXwsmor4bkW1vOcmrvzP5r9hMU7w8ckq70Hmznkt Y3tdSdXaqY7IWJqsx86I9u5U06VCaIErvC3CwvE4l/biW+hiHTzdi70LUUINJEKX n61CpOJvDH4cJoapUkKYuX+NDYIiKzgE7R0fAnnQNBPlq4vYI3w0cUr7XUNV10nC T1BOZvkVT5AfDuh2TxETPWrERPCmomWTdWXU+PDiXvvl0VlIYhzBtHHrdNNHAL+R z7DCA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeltddgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesmhekreertddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudelkeekgfdttdettdekgfduvdeiffelteegjeeihfet heekveeftedtuddvhfeunecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Jul 2022 10:28:10 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 7893C369; Tue, 19 Jul 2022 16:28:07 +0200 (CEST) Date: Tue, 19 Jul 2022 16:28:07 +0200 From: Alvaro Herrera To: Tom Lane Cc: Pavel Stehule , Andres Freund , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Default to hidden visibility for extension libraries where possi Message-ID: <20220719142807.2zex4cczycc5nqq5@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="mrd4wavdwia3u6qk" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1057666.1658238352@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --mrd4wavdwia3u6qk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit [ Redirecting thread to -hackers from -committers ] On 2022-Jul-19, Tom Lane wrote: > Alvaro Herrera writes: > > Do you just need to send a patch to add an exports.txt file to > > src/pl/plpgsql/src/ for these functions? > > The precedent of plpython says that PGDLLEXPORT markers are sufficient. > But yeah, we need a list of exactly which functions need to be > re-exposed. I imagine pldebugger has its own needs. A reasonable guess. I went as far as downloading pldebugger and compiling it, but it doesn't have a test suite of its own, so I couldn't verify anything about it. I did notice that plpgsql_check is calling function load_external_function(), and that doesn't appear in pldebugger. I wonder if the find_rendezvous_variable business is at play. Anyway, the minimal patch that makes plpgsql_check tests pass is attached. This seems a bit random. Maybe it'd be better to have a plpgsql_internal.h with functions that are exported only for plpgsql itself, and keep plpgsql.h with a set of functions, all marked PGDLLEXPORT, that are for external use. ... oh, and: $ postmaster -c shared_preload_libraries=plugin_debugger 2022-07-19 16:27:24.006 CEST [742142] FATAL: cannot request additional shared memory outside shmem_request_hook -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ --mrd4wavdwia3u6qk Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-add-PGDLLEXPORTS-to-plpgsql.patch"