Thread: PL/TCLu Function Waiting for External Java/JDBC Application

PL/TCLu Function Waiting for External Java/JDBC Application

From
Pat Pascal
Date:
I am having what appears to be a deadlock in a client application
(i.e. psql) when I use it to query a PL/TCLu function that invokes a
Java application which then uses JDBC to perform a number of queries
back to the same database from where the PL/TCLu function was queried.

It may be convoluted, but is this not allowed/supported in Postgresql?
Since the invoked Java application is a separate process outside the
database, can it not have it's query request satisfied while the the
initial client's query request (which selected the PL/TCL function)
is still not complete?  (Note that the Java application appears to be
hanging in it's first query on the database, so it doesn't exit to let
the PL/TCL function complete.)

I am using Postgresql 8.2 and Java 1.6.0_18.

Note that I am NOT able to use PL/Java and move the Java application
inside the database as a function (assuming that would solve the
problem).

Thanks for any help.

Pat



Re: PL/TCLu Function Waiting for External Java/JDBC Application

From
Pat Pascal
Date:
In case anyone in the future runs into this issue, I discovered a
resolution.  We are using the PGCluster patch to the Postgresql
database, and I determined need to use the following option in
postgresql.conf in order to get things to work as I expected:

not_replicate_prepared_select = true


Pat