Skip site navigation (1) Skip section navigation (2)

Re: weird buildfarm failures on arm/mipsel and --with-tcl

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: weird buildfarm failures on arm/mipsel and --with-tcl
Date: 2007-01-28 21:49:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
I wrote:
> One possibility for fixing it is that maybe we should be making an
> effort to execute Tcl_Finalize() before exiting the backend.  If so,
> having pltcl set up an on_proc_exit callback to do it would be the
> appropriate thing.  This is all speculation though.

Just for grins I tried this, and I can see by strace'ing that it changes
the process-shutdown-time behavior quite a lot: the secondary thread now
exits first, apparently after being told to via a message from the
primary.  So I think this might indeed be something good to do.  Would
you try the attached patch and see if it changes the behavior on your
systems?  (This patch is very ugly and will draw compiler warnings, but
don't worry about that yet.)

			regards, tom lane

Index: pltcl.c
RCS file: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v
retrieving revision 1.108
diff -c -r1.108 pltcl.c
*** pltcl.c	4 Oct 2006 00:30:14 -0000	1.108
--- pltcl.c	28 Jan 2007 21:45:40 -0000
*** 26,31 ****
--- 26,32 ----
  #include "fmgr.h"
  #include "nodes/makefuncs.h"
  #include "parser/parse_type.h"
+ #include "storage/ipc.h"
  #include "tcop/tcopprot.h"
  #include "utils/builtins.h"
  #include "utils/lsyscache.h"
*** 245,250 ****
--- 246,253 ----
  	if (!pltcl_be_init_done)
+ 			on_proc_exit(Tcl_Finalize, 0);
  		if (SPI_connect() != SPI_OK_CONNECT)
  			elog(ERROR, "SPI_connect failed");

In response to


pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-01-28 21:52:27
Subject: Re: Modifying and solidifying contrib
Previous:From: David FetterDate: 2007-01-28 21:44:54
Subject: Re: Modifying and solidifying contrib

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group