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

From Adrian Klaver
Subject Re: postgres 9.5 create function plpthon3u resets connections to server
Date
Msg-id f5660286-3329-2da3-056f-d37e96237b3b@aklaver.com
Whole thread Raw
In response to Re: postgres 9.5 create function plpthon3u resets connections to server  (Peter Crosbie <pjcrosbie@gmail.com>)
List pgsql-general
On 05/23/2016 01:42 PM, Peter Crosbie wrote:
> 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.)

Yes, probably related to how the Python versions where compiled. Also,
from my limited experimentation, the Anaconda Python works best when you
use it with other programs in the Anaconda distribution.

>
> 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.

Thanks for this, it will help anyone else that goes down the same path.

>
> Where did you get Postgres from and how did you install it?
>
>     postgresql-9.5.3-1-windows-x64.exe from here
>     <http://www.enterprisedb.com/products-services-training/pgdownload#windows>.
>
>
> 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
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Peter Crosbie
Date:
Subject: Re: postgres 9.5 create function plpthon3u resets connections to server
Next
From: Lucas Possamai
Date:
Subject: Re: Increased I/O / Writes