Re: stack depth limit exceeded problem. - Mailing list pgsql-hackers

From Oliver Jowett
Subject Re: stack depth limit exceeded problem.
Date
Msg-id 43349028.2090406@opencloud.com
Whole thread Raw
In response to stack depth limit exceeded problem.  (Thomas Hallgren <thhal@mailblocks.com>)
Responses Re: stack depth limit exceeded problem.
List pgsql-hackers
Thomas Hallgren wrote:

> PL/Java runs a JVM. Since a JVM is multi threaded, PL/Java goes to
> fairly  extreme measures to ensure that only one thread at a time can
> access the backend. So far, this have worked well but there is one small
> problem. [...]

I assume this means you have a single lock serializing requests to the
backend?

If you can't solve the depth checking problem (Tom doesn't seem to like
the idea of multiple threads calling into the backend..), what about
turning the original thread (i.e. the "main" backend thread) into a
"backend interface thread" that does nothing but feed callbacks into the
backend on request? Then run all the user code in a separate thread that
passes backend requests to the interface thread rather than directly
executing them. If it starts extra threads which makes DB requests, the
mechanism stays the same..

-O


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: 64-bit API for large objects
Next
From: "Dave Page"
Date:
Subject: Re: PgAdmin3 1.2.2 Install on Win32 Disrupts Pg Service