Re: It's June 1; do you know where your release is?

Поиск
Список
Период
Сортировка
Искать
От
Andrew Dunstan
Тема
Re: It's June 1; do you know where your release is?
Дата
Msg-id
4A270A06.1010507@dunslane.net
Ответ на
Список
Дерево обсуждения
It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Josh Berkus <josh@agliodbs.com>
Re: It's June 1; do you know where your release is? "Joshua D. Drake" <jd@commandprompt.com>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Magnus Hagander <magnus@hagander.net>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Robert Haas <robertmhaas@gmail.com>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Robert Haas <robertmhaas@gmail.com>
Re: It's June 1; do you know where your release is? Robert Haas <robertmhaas@gmail.com>
Re: It's June 1; do you know where your release is? Kris Jurka <books@ejurka.com>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Josh Berkus <josh@agliodbs.com>
Re: It's June 1; do you know where your release is? Sushant Sinha <sushant354@gmail.com>
Re: It's June 1; do you know where your release is? "David E. Wheeler" <david@kineticode.com>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Dave Page <dpage@pgadmin.org>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Dave Page <dpage@pgadmin.org>
Re: It's June 1; do you know where your release is? Magnus Hagander <magnus@hagander.net>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Magnus Hagander <magnus@hagander.net>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Dave Page <dpage@pgadmin.org>
Re: It's June 1; do you know where your release is? Andrew Dunstan <andrew@dunslane.net>
Re: It's June 1; do you know where your release is? Dave Page <dpage@pgadmin.org>
Re: It's June 1; do you know where your release is? Magnus Hagander <magnus@hagander.net>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Magnus Hagander <magnus@hagander.net>
Re: It's June 1; do you know where your release is? Robert Haas <robertmhaas@gmail.com>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>
Re: It's June 1; do you know where your release is? "David E. Wheeler" <david@kineticode.com>
Re: It's June 1; do you know where your release is? Tom Lane <tgl@sss.pgh.pa.us>


Dave Page wrote:
> On Wed, Jun 3, 2009 at 11:54 PM, Andrew Dunstan  wrote:
>   
>> Update: the problem is apparently occurring during the call to perl_parse()
>> in plperl_init_interp().
>>
>>     
>
> Not sure if you saw the previous thread on this, but here's a
> backtrace that gives some more detail:
> http://archives.postgresql.org/pgsql-bugs/2009-05/msg00198.php
>   

Well, that's not too easy to read, but anyway, I got to the bottom of 
it. Turns out there's a change in the Perl embedding API that nobody 
noticed. The attached patch worked for me on Windows. We'll need 
something like this on other platforms I believe. I see via Google that 
Debian is objecting to packages that call perl_parse without calling 
PERL_SYS_INIT (or PERL_SYS_INIT3). I'm even wondering if we should 
backpatch it.

Of course, that leaves the issue of the library name to be fixed, but 
sufficient unto the day ...

cheers

andrew




Index: plperl.c
===================================================================
RCS file: /cvsroot/pgsql/src/pl/plperl/plperl.c,v
retrieving revision 1.146
diff -c -r1.146 plperl.c
*** plperl.c	20 Feb 2009 10:39:19 -0000	1.146
--- plperl.c	3 Jun 2009 23:34:30 -0000
***************
*** 399,404 ****
--- 399,406 ----
  		"", "-e", PERLBOOT
  	};
  
+ 	int nargs = 3;
+ 
  #ifdef WIN32
  
  	/*
***************
*** 447,454 ****
  		elog(ERROR, "could not allocate Perl interpreter");
  
  	perl_construct(plperl_held_interp);
  	perl_parse(plperl_held_interp, plperl_init_shared_libs,
! 			   3, embedding, NULL);
  	perl_run(plperl_held_interp);
  
  	if (interp_state == INTERP_NONE)
--- 449,459 ----
  		elog(ERROR, "could not allocate Perl interpreter");
  
  	perl_construct(plperl_held_interp);
+ #ifdef PERL_SYS_INIT
+ 	PERL_SYS_INIT(&nargs, (char ***) &embedding);
+ #endif;
  	perl_parse(plperl_held_interp, plperl_init_shared_libs,
! 			   nargs, embedding, NULL);
  	perl_run(plperl_held_interp);
  
  	if (interp_state == INTERP_NONE)
В списке pgsql-hackers по дате отправления
От: Bruce Momjian
Дата:
От: Hiroshi Inoue
Дата:
FAQ