Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-22 Thread Jan Urbański

On 22/08/12 13:28, Sachin Srivastava wrote:

Yes, It worked for me also..
So will this be a workaround? Or do we intend to use something like
Py_SetPythonHome() before calling Py_Initialize()/


I think the best we can do is to document that for some installations 
you might need to set PYTHONHOME. I don't think we can figure it out at 
runtime (we could then use setenv to fix it). This is similar to having 
to set PYTHONPATH if you want to import code installed in virtualenvs or 
other nonstandard locations.


I'm leaning towards just documenting, mucking around with environment 
variables from inside of Postgres' shared libraries seems like a recipe 
for disaster.


Cheers,
Jan


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


Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-22 Thread Sachin Srivastava
Yes, It worked for me also..
So will this be a workaround? Or do we intend to use something like
Py_SetPythonHome() before calling Py_Initialize()/

On Wed, Aug 22, 2012 at 3:32 PM, Jan Urbański  wrote:

> On 21/08/12 20:13, Josh Berkus wrote:
>
>>
>>  No. I get the same backtrace when I try against the 9.1.5 (REL9_1_STABLE)
>>> branch.
>>>
>>
> I have reproduced this on Linux, seems like the fix is to to run the
> postmaster with this env variable exported:
>
> PYTHONHOME=/opt/ActivePython-**3.2/
>
> (or wherever you installed ActivePython).
>
> To give credit, I found the decisive clue here:
> http://manojadinesh.blogspot.**com/2012/06/fatal-python-**
> error-pyinitialize-unable.html
>
> Cheers,
> Jan
>



-- 
Regards,
Sachin Srivastava
EnterpriseDB, India


Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-22 Thread Jan Urbański

On 21/08/12 20:13, Josh Berkus wrote:



No. I get the same backtrace when I try against the 9.1.5 (REL9_1_STABLE)
branch.


I have reproduced this on Linux, seems like the fix is to to run the 
postmaster with this env variable exported:


PYTHONHOME=/opt/ActivePython-3.2/

(or wherever you installed ActivePython).

To give credit, I found the decisive clue here: 
http://manojadinesh.blogspot.com/2012/06/fatal-python-error-pyinitialize-unable.html


Cheers,
Jan


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


Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-21 Thread Josh Berkus

> No. I get the same backtrace when I try against the 9.1.5 (REL9_1_STABLE)
> branch.

OK, not a regression then.

Can you install plpython3u using non-Activestate python?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


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


Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-21 Thread Sachin Srivastava
On Tue, Aug 21, 2012 at 10:37 PM, Josh Berkus  wrote:

> On 8/21/12 6:34 AM, Sachin Srivastava wrote:
> > Hi all,
> >
> > On my Mac 10.6.8 using ActiveState Python 3.2.2, I am getting a crash
> when
> > I try to execute "CREATE EXTENSION plpython3u"
> > This is the backtrace:
>
> Does it work in Postgres 9.1?
>
No. I get the same backtrace when I try against the 9.1.5 (REL9_1_STABLE)
branch.

>
>
> --
> Josh Berkus
> PostgreSQL Experts Inc.
> http://pgexperts.com
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>



-- 
Regards,
Sachin Srivastava
EnterpriseDB, India


Re: [HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-21 Thread Josh Berkus
On 8/21/12 6:34 AM, Sachin Srivastava wrote:
> Hi all,
> 
> On my Mac 10.6.8 using ActiveState Python 3.2.2, I am getting a crash when
> I try to execute "CREATE EXTENSION plpython3u"
> This is the backtrace:

Does it work in Postgres 9.1?


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


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


[HACKERS] PostgreSQL 9.2beta4 (& git HEAD) server crash on creating extension plpython3u

2012-08-21 Thread Sachin Srivastava
Hi all,

On my Mac 10.6.8 using ActiveState Python 3.2.2, I am getting a crash when
I try to execute "CREATE EXTENSION plpython3u"
This is the backtrace:

Program received signal SIGABRT, Aborted.
0x7fff899a40b6 in __kill ()
(gdb) bt
#0  0x7fff899a40b6 in __kill ()
#1  0x7fff89a449f6 in abort ()
#2  0x00010a5da84c in Py_InitializeEx ()
#3  0x000100bd7467 in _PG_init ()
#4  0x0001003d8892 in internal_load_library ()
#5  0x0001003d835e in load_external_function ()
#6  0x0001000c0509 in fmgr_c_validator ()
#7  0x0001003dc808 in OidFunctionCall1Coll ()
#8  0x0001000c01e0 in ProcedureCreate ()
#9  0x0001001563ca in CreateProceduralLanguage ()
#10 0x0001002c60c8 in standard_ProcessUtility ()
#11 0x0001002c49a9 in ProcessUtility ()
#12 0x00010014005d in execute_sql_string ()
#13 0x0001001404f8 in execute_extension_script ()
#14 0x000100141459 in CreateExtension ()
#15 0x0001002c51b0 in standard_ProcessUtility ()
#16 0x0001002c49a9 in ProcessUtility ()
#17 0x0001002c38f6 in PortalRunUtility ()
#18 0x0001002c3a9b in PortalRunMulti ()
#19 0x0001002c3085 in PortalRun ()
#20 0x0001002bcb16 in exec_simple_query ()
#21 0x0001002c1416 in PostgresMain ()
#22 0x00010026d1d9 in BackendRun ()
#23 0x00010026c898 in BackendStartup ()
#24 0x000100269684 in ServerLoop ()
#25 0x000100268fa3 in PostmasterMain ()
#26 0x0001001dcd4d in main ()
(gdb)

"CREATE EXTENSION plpython2u" works when I compile the same code using
ActiveState Python 2.7.

So is it an issue with the ActiveState Python 3.2??



-- 
Regards,
Sachin Srivastava
EnterpriseDB, India