From: Yi Lin <ylin30@cs.mcgill.ca>
To: pgsql-jdbc@postgresql.org
Subject: FastPath blocked when ERROR is thrown
Date: Tue, 11 Apr 2006 18:06:15 -0400 (EDT)
Message-ID: <59619.132.206.52.74.1144793175.squirrel@mail.cs.mcgill.ca> (raw)
HI
I used java API FastPath.fastpath(fid, ...) to call a C function
PGfn(conn, fid,...) in the kernal. But if there is an exception (i.e.,
ERROR messages is thrown in the backend due to elog(ERROR, ...)), the
FastPath.fastpath(fid, ..) is blocked and never returns. The DB backend is
also dead. I have to "pkill -9 post" in order to restore everything. Can
anyone give a clue of what the problems should be? Where should are the
bugs possibly located?
The java codes is attached:
public boolean putWriteSet(java.sql.Connection conn, byte[] writeSet)
throws SQLException
{
Fastpath fp = ((org.postgresql.Connection)conn).getFastpathAPI();
FastpathArg[] args = new FastpathArg[1];
args[0] = new FastpathArg(writeSet);
fp.fastpath(2075, false, args); //to apply writeset, indirectly call
PQfn(conn, 2075, ...) implemented in the kernal in C.
return true;
}
I am not the original author of C version PQfn(.,2075,..) so I have no
idea where and how to debug it. I doubt that the blocking is due to
implementation of C part instead of Java part. But I don't know how to
start my debugging.
thanks in advance!
=======================================
Yi Lin
Ph.D. candidate
School of Computer Science
McGill University
Montreal, Quebec,Canada
URL: http://www.cs.mcgill.ca/~ylin30/
\\\ $ ///
@ @
======o0o==0==o0o======================
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: ylin30@cs.mcgill.ca
Subject: Re: FastPath blocked when ERROR is thrown
In-Reply-To: <59619.132.206.52.74.1144793175.squirrel@mail.cs.mcgill.ca>
References: <59619.132.206.52.74.1144793175.squirrel@mail.cs.mcgill.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox