Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a9o4q-0007s2-SW for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Dec 2015 05:59:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a9o4q-0005UG-EL for pgsql-bugs@arkaria.postgresql.org; Fri, 18 Dec 2015 05:59:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9o4p-0005Tt-J8 for pgsql-bugs@postgresql.org; Fri, 18 Dec 2015 05:59:39 +0000 Received: from keepquiet.net ([144.76.43.178] helo=rand.keepquiet.net) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9o4k-0005hc-UW for pgsql-bugs@postgresql.org; Fri, 18 Dec 2015 05:59:36 +0000 Received: from [10.130.11.109] (cm-84.210.87.28.getinternet.no [84.210.87.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: terje@elde.net) by rand.keepquiet.net (Postfix) with ESMTPSA id 9245F5F; Fri, 18 Dec 2015 05:59:30 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: BUG #13823: Database crash - import requests in plpython3u From: Terje Elde X-Mailer: iPhone Mail (13C75) In-Reply-To: <20151217133409.3886.97313@wrigleys.postgresql.org> Date: Fri, 18 Dec 2015 06:59:28 +0100 Cc: pgsql-bugs@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <01D7F600-660B-44AE-86CC-F56BD563DD2F@elde.net> References: <20151217133409.3886.97313@wrigleys.postgresql.org> To: george.wesington@gmail.com X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org > On 17 Dec 2015, at 14:34, george.wesington@gmail.com wrote: >=20 > After the crash the database needs to be restarted because it cannot be > accessed anymore. The same script runs perfectly when run directly from > python. >=20 > Let me know if you need any more information. Could you try to run it as the PostgreSQL user, but outside PostgreSQL? Also, please double check that it's run as Python 3 when testing that. The = code looks fairly compatible between 2.7 and 3.x, and my best initial guess= would be that Python crashes on a missing or faulty import.=20 Can you successfully run a simpler Python function from PostgreSQL? (One th= at doesn't import anything). Easy way to narrow down if it's likely the req= uests-module in Python, or if it's related to plpython.=20 Oh, and how did you install Python, PostgreSQL, plpython and the requests m= odule? Terje --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs