Re: Re: Postgres 9.4.4/9.4.6: plpython2/3 intallation issues on a Windows 7 machine

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: margrit drescher <margrit2103(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: Postgres 9.4.4/9.4.6: plpython2/3 intallation issues on a Windows 7 machine
Date: 2016-03-31 13:50:02
Message-ID: 56FD2B0A.7050902@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/31/2016 02:53 AM, margrit drescher wrote:
> I originally used the 9.4.6 version on
> http://www.enterprisedb.com/products-services-training/pgdownload#windows for
> 64-bit windows and loaded the language pack recommended in the readme file.

Did you do this?:

If you are using Windows 64, you must set the following variables:
=========================================================================================
set PYTHONHOME=C:\EnterpriseDB\LanguagePack\9.4\x64\Python-3.3
set
PATH=C:\EnterpriseDB\LanguagePack\9.4\x64\Python-3.3;C:\EnterpriseDB\LanguagePack\9.4\x64\Perl-5.16\bin;C:\EnterpriseDB\LanguagePack\9.4\x64\Tcl-8.5\bin;%PATH%

My suspicion is that plpython3u is finding the Python 3.2 install on the
machine not the Python 3.3 one.

>
> On 31 March 2016 at 11:25, Alex Ignatov-2 [via PostgreSQL] <[hidden
> email] </user/SendEmail.jtp?type=node&node=5896177&i=0>> wrote:
>
>
>
> On 31.03.2016 10:50, margrit drescher wrote:
>
> > I installed postgres 9.4.6 on my Windows 7 (64-bit) machine, and
> managed to
> > create the plpython3u extension without a problem.
> >
> > I then restored an existing DB (created in postgres 9.3). The
> plpython3
> > functions restored without a hitch and can execute.
> >
> >
> > However, as soon as I try to create a NEW plpython3 function on
> the db the
> > postgres service terminates and does an auto-recovery.
> >
> > I then downgraded to postgres 9.4.4 and am still encountering the
> same
> > issue.
> >
> >
> >
> > Example:
> >
> > When running the following code:
> >
> > "create function test() returns void as $$ plpy.notice( 'xxx' );
> $$ language
> > plpython3u"
> >
> >
> > the following is generated in the log:
> >
> > "
> > 2016-03-31 09:36:56 CAT LOG: server process (PID 6376) exited
> with exit
> > code 3
> > 2016-03-31 09:36:56 CAT DETAIL: Failed process was running: create
> > function test() returns void as $$ plpy.notice( 'xxx' ); $$ language
> > plpython3u
> > 2016-03-31 09:36:56 CAT LOG: terminating any other active server
> processes
> > 2016-03-31 09:36:56 CAT WARNING: terminating connection because
> of crash of
> > another server process
> > 2016-03-31 09:36:56 CAT DETAIL: The postmaster has commanded
> this server
> > process to roll back the current transaction and exit, because
> another
> > server process exited abnormally and possibly corrupted shared
> memory.
> > 2016-03-31 09:36:56 CAT HINT: In a moment you should be able to
> reconnect
> > to the database and repeat your command.
> > 2016-03-31 09:36:56 CAT WARNING: terminating connection because
> of crash of
> > another server process
> > 2016-03-31 09:36:56 CAT DETAIL: The postmaster has commanded
> this server
> > process to roll back the current transaction and exit, because
> another
> > server process exited abnormally and possibly corrupted shared
> memory.
> > 2016-03-31 09:36:56 CAT HINT: In a moment you should be able to
> reconnect
> > to the database and repeat your command.
> > 2016-03-31 09:36:56 CAT WARNING: terminating connection because
> of crash of
> > another server process
> > 2016-03-31 09:36:56 CAT DETAIL: The postmaster has commanded
> this server
> > process to roll back the current transaction and exit, because
> another
> > server process exited abnormally and possibly corrupted shared
> memory.
> > 2016-03-31 09:36:56 CAT HINT: In a moment you should be able to
> reconnect
> > to the database and repeat your command.
> >
> > "
> >
> > I am guessing that my problem might have something to do with the
> fact that
> > the plpython2u language is not installed on the DB - although I
> am not sure
> > why it should it need it, when executing a plpython3 command. As I
> > understand it, Postgres 9.4 accomodates both versions of python.
> However I
> > have not been able to figure out how to load plpython2u onto the
> db. The
> > postgres version I installed does not ship with plpython2.dll and
> I have not
> > been able to get hold of a copy. ( Python 2.7 /3.2 and 3.3 are
> installed on
> > my machine, and I am running postgre versions 9.2, 9.3 and 9.4.4 on
> > different ports).
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://postgresql.nabble.com/Postgres-9-4-4-9-4-6-plpython2-3-intallation-issues-on-a-Windows-7-machine-tp5896157.html
> > Sent from the PostgreSQL - general mailing list archive at
> Nabble.com.
> >
> >
> Hello!
> What postgres distr for Win are you using?
>
> --
> Alex Ignatov
> Postgres Professional: http://www.postgrespro.com
> The Russian Postgres Company
>
>
>
> --
> Sent via pgsql-general mailing list ([hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5896174&i=0>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://postgresql.nabble.com/Postgres-9-4-4-9-4-6-plpython2-3-intallation-issues-on-a-Windows-7-machine-tp5896157p5896174.html
>
> To unsubscribe from Postgres 9.4.4/9.4.6: plpython2/3 intallation
> issues on a Windows 7 machine, click here.
> NAML
> <http://postgresql.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: Postgres 9.4.4/9.4.6: plpython2/3
> intallation issues on a Windows 7 machine
> <http://postgresql.nabble.com/Postgres-9-4-4-9-4-6-plpython2-3-intallation-issues-on-a-Windows-7-machine-tp5896157p5896177.html>
> Sent from the PostgreSQL - general mailing list archive
> <http://postgresql.nabble.com/PostgreSQL-general-f1843780.html> at
> Nabble.com.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2016-03-31 14:06:24 Re: Is it possible to delete a single value from an enum type?
Previous Message Adrian Klaver 2016-03-31 13:47:43 Re: Postgres 9.4.4/9.4.6: plpython2/3 intallation issues on a Windows 7 machine