Found the problem. If I have a very long environment variable exported
and I start PG, PG crashes when I try to load PG/Tcl. In my case I use
color ls and I have a very long LS_COLORS environment variable set.
I have duplicated the problem by renaming my .bashrc and logging back
in. With this clean environment, I started PG and loaded PG/Tcl without
any problems. I then created the following environment variable on the
and exported it. (Obviously the line above is going to be broken into
multiple lines by the mailer...).
Then I stopped and restarted PG, loaded PG/Tcl and PG crashed. You
*must* stop and restart PG for the problem to exhibit itself, otherwise
it won't pick up the change in the environment. I suspect I'm running
into a buffer overflow situation.
Ok, it fails consistently when LONG_VAR is 523 characters or greater;
works consistently when LONG_VAR is 522 characters or smaller. Might
not fail at the same number for others.
To prove that this was the problem, I cleaned out my environment by
moving my .bashrc file to another name, logged out, logged in, start
On Feb 21, 2004, at 1:51 AM, Tom Lane wrote:
> Scott Goodwin <scott(at)scottg(dot)net> writes:
>> Hoping someone can help me figure out why I can't get PL/Tcl to load
>> without crashing the backend on Mac OS 10.3.2.
> FWIW, pltcl seems to work for me. Using up-to-date Darwin 10.3.2
> and PG CVS tip, I did
> configure --with-tcl --without-tk
> then make, make install, etc. pltcl installs and passes its regression
>> psql:/Users/scott/pgtest/add_languages.sql:12: server closed the
>> connection unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
> Can you provide a stack trace for this?
> regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Kevin Brown||Date: 2004-02-22 11:57:36|
|Subject: Re: Too-many-files errors on OS X|
|Previous:||From: Heikki Linnakangas||Date: 2004-02-22 02:26:56|
|Subject: Re: Two-phase commit|
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2004-02-22 17:21:48|
|Subject: Re: [HACKERS] Mac OS X, PostgreSQL, PL/Tcl |
|Previous:||From: Damon Hart||Date: 2004-02-22 03:43:36|
|Subject: intermittent error: 'variable not found in subplan target list' -