Re: postgresql server crash on windows 7 when using plpython

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/08/2011 10:54 PM, c k wrote:

Normal python functions returning text etc. are working but when conatining

import sys
from uuid import getnode as get_mac
mac = get_mac()
return mac

fails. What will be the reason?

You still haven't supplied the error message you get when you run this.

In the absence of better information, my guess would be that python's uuid module uses ossp-uuid, same as PostgreSQL does, but a different version or one compiled differently. The PostgreSQL `bin' dir with the postgresql version of the DLL will be in the path before the Python one, so Python is calling into a different version of the DLL than it expects and probably crashing as a result.

That would be consistent with it working from the python command line.

To work around this, I'd either use the ossp-uuid functions via the SPI rather than using the Python UUID module, or I'd remove the OSSP-UUID dll from the postgresql directory. You can certainly try that to see if it helps.

This is one of the joys you get with Windows software not being managed by a central packaging system. Everyone bundles their own versions of all the dependencies, leaving messes like this where two DLLs with the same name aren't quite compatible. Yay!

--
Craig Ringer

--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux