Hi dhananjayjejur , Great! Thanks for your detailed explaination! Its finnally working now. I think I messed it up because I was not setting these env variables via command line. I have used the GUI for that. Maybe for the wrong user. Regards, localhost
... View more
I was able to fix this issue by myself after I have copied the python36.dll into the system32 folder even though it was the same dll which was lying inside of the added directory inside the PATH variable. It would be nice to get feedback on how I can do it with the PATH variable so I can delete the dll from the system32 directory. But this lead to the following problem: postgres=# create extension plpython3u;
ERROR: extension "plpython3u" already exists
postgres=# CREATE FUNCTION pymax (a integer, b integer)
postgres-# RETURNS integer
postgres-# AS $$
postgres$# if a > b:
postgres$# return a
postgres$# return b
postgres$# $$ LANGUAGE plpython3u;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed. I called create extension plpython3u; just to show it is already installed. This is the log file: 2019-08-14 14:05:03.213 GMT  LOG: database system was shut down at 2019-08-14 14:05:01 GMT
2019-08-14 14:05:03.276 GMT  LOG: database system is ready to accept connections
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00006ce4 (most recent call first):
2019-08-14 14:05:45.025 GMT  LOG: server process (PID 27136) was terminated by exception 0xC0000409
2019-08-14 14:05:45.025 GMT  DETAIL: Failed process was running: CREATE FUNCTION pymax (a integer, b integer)
if a > b:
$$ LANGUAGE plpython3u;
2019-08-14 14:05:45.025 GMT  HINT: See C include file "ntstatus.h" for a description of the hexadecimal value.
2019-08-14 14:05:45.025 GMT  LOG: terminating any other active server processes
2019-08-14 14:05:45.026 GMT  WARNING: terminating connection because of crash of another server process
2019-08-14 14:05:45.026 GMT  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.
2019-08-14 14:05:45.026 GMT  HINT: In a moment you should be able to reconnect to the database and repeat your command.
2019-08-14 14:05:45.068 GMT  FATAL: the database system is in recovery mode
2019-08-14 14:05:45.083 GMT  LOG: all server processes terminated; reinitializing
2019-08-14 14:05:45.146 GMT  LOG: database system was interrupted; last known up at 2019-08-14 14:05:03 GMT
2019-08-14 14:05:45.843 GMT  LOG: database system was not properly shut down; automatic recovery in progress
2019-08-14 14:05:45.847 GMT  LOG: redo starts at 0/1B7D320
2019-08-14 14:05:45.850 GMT  LOG: invalid record length at 0/1B8E7D0: wanted 24, got 0
2019-08-14 14:05:45.850 GMT  LOG: redo done at 0/1B8E798
2019-08-14 14:05:45.850 GMT  LOG: last completed transaction was at log time 2019-08-14 14:05:34.39136+00 Even the steps from the LanguagePack Guide does not work: https://www.enterprisedb.com/edb-docs/d/edb-postgres-advanced-server/user-guides/language-pack-guide/11/EDB_Postgres_Language_Pack_Guide.1.08.html
... View more
Hi, I have installed PostgreSQL with the enterprisedb installer version 11.4. PostgreSQL 11.4, compiled by Visual C++ build 1914, 64-bit Now I want to install the python extension but I always get this error: postgres=# create extension plpython3u; ERROR: could not load library "C:/Program Files/PostgreSQL/11/lib/plpython3.dll": The specified module could not be found. I have tried my own Python version (3.6.8) and an embeddable version (3.6.5) both did not work. In both cases I have set the PATH variable to the correct Python version. The plpython3.dll is also available. Right now I have installed the LanguagePack provided with the StackBuilder also no success. I have set the PYTHONHOME variable and set PATH to the languagepack python version. In all cases a dependency analyze tool finds the needed python36.dll. I am running Windows 10. Regards, localhost
... View more