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 1itvGV-0001ww-WD for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Jan 2020 15:16:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1itvGU-0004yb-5e for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Jan 2020 15:16:26 +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 1itvGT-0004yU-U2 for pgsql-bugs@lists.postgresql.org; Tue, 21 Jan 2020 15:16:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1itvGO-0004Mn-JA for pgsql-bugs@lists.postgresql.org; Tue, 21 Jan 2020 15:16:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00LFGDmU011277; Tue, 21 Jan 2020 10:16:13 -0500 From: Tom Lane To: Julien Rouhaud cc: kalyan.singh@capgemini.com, PostgreSQL mailing lists Subject: Re: BUG #16221: ERROR while importing Plpython , pltcl In-reply-to: References: <16221-eee1afe4563008e3@postgresql.org> Comments: In-reply-to Julien Rouhaud message dated "Tue, 21 Jan 2020 09:53:44 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <11275.1579619773.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 21 Jan 2020 10:16:13 -0500 Message-ID: <11276.1579619773@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Julien Rouhaud writes: > On Tue, Jan 21, 2020 at 8:35 AM PG Bug reporting form > wrote: >> We are trying to import =E2=80=9Cplpythonu=E2=80=9D in postgresql but= when running the >> below query we are getting an error:- >> CREATE EXTENSION plpythonu >> ERROR: could not load library "C:/Program >> Files/PostgreSQL/11/lib/plpython2.dll": The specified module could not = be >> found. >> Although I have =E2=80=9Cplpython2.dll=E2=80=9D is there in the same lo= cation. > If all the files are present in the expected location, this is > probably due to wrong privilege access on the files, or some antivirus > preventing postgres from loading the libs. Have you tried after > disabling the antivirus or configuring an exception for the postgres' > directories? Another likely theory is that the message is not trying to complain about plpython2.dll, but about some library that that depends on, probably libpython itself. If you look into the postmaster log file, rather than just at what's reported to the client, you might find some additional low-level messages clarifying this. If this were a Linux machine I'd recommend using "ldd" to investigate the dependencies of plpython2.dll. But I don't know what the equivalent tool for Windows is. regards, tom lane