Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id EE4A1B5DBD6 for ; Wed, 10 Aug 2011 03:37:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 54512-03; Wed, 10 Aug 2011 06:37:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f174.google.com (mail-qy0-f174.google.com [209.85.216.174]) by mail.postgresql.org (Postfix) with ESMTP id 9A091B5D8C5; Wed, 10 Aug 2011 03:37:37 -0300 (ADT) Received: by qyk38 with SMTP id 38so2700858qyk.19 for ; Tue, 09 Aug 2011 23:37:37 -0700 (PDT) Received: by 10.224.76.144 with SMTP id c16mr2966347qak.273.1312958256974; Tue, 09 Aug 2011 23:37:36 -0700 (PDT) Received: from [10.1.1.8] (124-169-181-228.dyn.iinet.net.au [124.169.181.228]) by mx.google.com with ESMTPS id ej7sm318866qab.2.2011.08.09.23.37.34 (version=SSLv3 cipher=OTHER); Tue, 09 Aug 2011 23:37:36 -0700 (PDT) Message-ID: <4E422729.7000007@ringerc.id.au> Date: Wed, 10 Aug 2011 14:37:29 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: c k CC: pgsql-general@postgresql.org, pgsql-admin Subject: Re: postgresql server crash on windows 7 when using plpython References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/72 X-Sequence-Number: 38059 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