Re: postgres 9.5 create function plpthon3u resets connections to server - Mailing list pgsql-general

From Peter Crosbie
Subject Re: postgres 9.5 create function plpthon3u resets connections to server
Date
Msg-id CANsU3HgR7F2qu5nmU=ajov4k_XZJ+2rD-2eRBpzpm0dFeive1g@mail.gmail.com
Whole thread Raw
In response to Re: postgres 9.5 create function plpthon3u resets connections to server  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: postgres 9.5 create function plpthon3u resets connections to server  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Adrian, many thanks for picking this up.

Going back to get the link for the installation download, I notice the "readme.txt" link next to the installer. Looking at that file for the first time, it clearly lays out how to include the language packs including plpython. After following the instructions in the readme.txt the plpython extension is working fine. No excuse for not reading the readme. My bad.

As you note in your response, I was not matching the required version of python. The bottom line is that postgresql does seem to be relatively sensitive to the particular distribution of python, not just version - (I had matched the versions postgres python distb 3.3.4 and anaconda 3.3.4.)

Setting the server's path to use C:\EnterpriseDB\LanguagePack\9.5\x64\Python-3.3 as described in the readme.txt on the download site was all that it took to get it working correctly.

Thanks again picking this up and getting me pointed in the right direction. 

For completeness, here are the answers to your specific questions.

Where did you get Postgres from and how did you install it?

postgresql-9.5.3-1-windows-x64.exe from here.

Can you show how you created the extension?

CREATE EXTENSION plpython3u;

The required version will be what ever plpythonu was built against when the binary was built. At a guess and given what you are seeing that is not the version in the Anaconda distribution.

Agreed and that is indeed the issue, as noted above in the fix.

What is the dependency walker output?

... snip

[  6] PLPYTHON3.DLL
     [ ? ] LIBINTL-8.DLL
     [ ? ] PYTHON33.DLL
     [ ? ] POSTGRES.EXE
     [  6] MSVCR120.DLL
          [ ^6] KERNEL32.DLL
               [F^6] NTDLL.DLL


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: postgres 9.5 create function plpthon3u resets connections to server
Next
From: Adrian Klaver
Date:
Subject: Re: postgres 9.5 create function plpthon3u resets connections to server