Re: postgres 9.5 create function plpthon3u resets connections to server

From: Peter Crosbie <pjcrosbie(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres 9.5 create function plpthon3u resets connections to server
Date: 2016-05-23 20:42:53
Message-ID: CANsU3HgR7F2qu5nmU=ajov4k_XZJ+2rD-2eRBpzpm0dFeive1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
<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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-05-23 21:06:45 Re: postgres 9.5 create function plpthon3u resets connections to server
Previous Message Adrian Klaver 2016-05-23 19:16:15 Re: postgres 9.5 create function plpthon3u resets connections to server