Then started the postgresql again, called the same plpython function again and again server crashed without any details in the log.
Also searched for the above dll or similar in python's installation but not founf, one available was not dll but was .py file.
Recent log contains following lines.
2011-08-10 22:25:38 IST LOG: database system was shut down at 2011-08-10 14:40:36 IST
2011-08-10 22:25:38 IST FATAL: the database system is starting up
2011-08-10 22:25:38 IST LOG: database system is ready to accept connections
2011-08-10 22:25:38 IST LOG: autovacuum launcher started
Fatal Python error: PyThreadState_Get: no current thread
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
2011-08-10 22:27:49 IST LOG: server process (PID 2584) exited with exit code 3
2011-08-10 22:27:49 IST LOG: terminating any other active server processes
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of another server process
2011-08-10 22:27:49 IST 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.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect to the database and repeat your command.
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of another server process
2011-08-10 22:27:49 IST 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.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect to the database and repeat your command.
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of another server process
2011-08-10 22:27:49 IST 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.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect to the database and repeat your command.
2011-08-10 22:27:49 IST WARNING: terminating connection because of crash of another server process
2011-08-10 22:27:49 IST 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.
2011-08-10 22:27:49 IST HINT: In a moment you should be able to reconnect to the database and repeat your command.
2011-08-10 22:27:49 IST LOG: all server processes terminated; reinitializing
2011-08-10 22:27:58 IST FATAL: pre-existing shared memory block is still in use
2011-08-10 22:27:58 IST HINT: Check if there are any old server processes still running, and terminate them.
Is it related with python threads?
Regards,
Chaitanya Kulkarni
On Wed, Aug 10, 2011 at 7:34 PM, Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote:
On Tuesday, August 09, 2011 10:13:17 pm c k wrote:The above function runs correctly in Postgres 9.0.3 on my Linux machine. I would
> Here is the actual function.
> create or replace function software.python_test() returns text as
> $body$
> import sys
> from uuid import getnode as get_mac
> mac = get_mac()
> return mac
> $body$
> language plpythonu volatile security definer;
>
> When running the same code from python prompt, it run correctly without any
> error.
say Craigs post about multiple versions of uuid causing the problem is the
answer to your problem.