From: | c k <shreeseva(dot)learning(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgresql server crash on windows 7 when using plpython |
Date: | 2011-08-24 06:10:19 |
Message-ID: | CAN2Y=uM+OBMzWihhBTKmY45=JLUYZwGGoJ-CgYywjO5X86h60g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
Yes,
Now I have removed python 2.7. Restarted the postgresql. When I call the
above mentioned function, now server doesn't crash. It is running, but I get
the error 'No connection to the server'. I am using PgAdmin to work with
Postgresql. I tried to execute a simple function to show python version or
path, but still I am getting the same error. I tried to execute other
plpython function but still the same problem. I can use other plsql and sql
functions correctly.
When checked the log file it have entries like this:
2011-08-24 11:19:57 IST LOG: database system was interrupted; last known up
at 2011-08-10 22:25:38 IST
2011-08-24 11:19:57 IST LOG: database system was not properly shut down;
automatic recovery in progress
2011-08-24 11:19:57 IST FATAL: the database system is starting up
2011-08-24 11:19:57 IST LOG: consistent recovery state reached at
0/424E9800
2011-08-24 11:19:57 IST LOG: redo starts at 0/424E9800
2011-08-24 11:19:57 IST LOG: record with zero length at 0/424EFC70
2011-08-24 11:19:57 IST LOG: redo done at 0/424EFC30
2011-08-24 11:19:57 IST LOG: last completed transaction was at log time
2011-08-10 22:27:35.06+05:30
2011-08-24 11:19:57 IST LOG: database system is ready to accept connections
2011-08-24 11:19:58 IST LOG: autovacuum launcher started
ImportError: No module named site
ImportError: No module named site
ImportError: No module named site
ImportError: No module named site
ImportError: No module named site
ImportError: No module named site
ImportError: No module named site
This last line is added every time I call any plpython function. Here is the
simple plpython function.
CREATE OR REPLACE FUNCTION software.pyver()
RETURNS text AS
$BODY$
import sys
#return sys.version
return sys.path
$BODY$
LANGUAGE plpythonu VOLATILE
COST 100;
What is the problem?
Chaitany Kulkarni
On Mon, Aug 22, 2011 at 8:08 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:
> On Monday, August 22, 2011 7:24:30 am c k wrote:
> > No i didn't removed any thing. Only I have installed python 2.6. And then
> > tried to create plpythonu. It got created, but when tries to execute
> > already mentioned function server crashes.
> >
> > I didn't have any clue.
>
> My guess is this is the clue:
>
> "First I installed python 2.7 and then added python installation
> path to windows PATH variable. ..."
>
> It is very possible you have a version cross reference going on. In other
> words
> pl/pythonu is being compiled against one version of Python, but run against
> another. If it is possible I would remove the Python 2.7 installation or at
> least the references to it and then recompile pl/pythonu.
>
>
> >
> > Thanks and regards.
> >
> > Chaitany Kulkarni
> >
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Florian Weimer | 2011-08-24 08:30:34 | Database alias |
Previous Message | Fujii Masao | 2011-08-24 04:22:14 | Re: replication_timeout does not seem to be working |
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2011-08-24 06:26:34 | Re: JDBC Connection Errors |
Previous Message | Rob Sargent | 2011-08-24 04:55:21 | Re: documentation suggestion |