I would love to distribute this code to anybody who wants it. Any
suggestions for a good place? However, calling the
work a code redesign is a bit generous. This was more like a
brute force hack. I just moved all the connection related global
variables to
a thread local "environment variable" and bypassed much of the postmaster
code.
I did this so I could port my app which was originally designed for
Oracle OCI and Java. My app uses very few SQL statements but uses them
over and over. I wanted true prepared statements linked to Java with JNI.
I got both as well as batched transaction writes ( which was more relevant
before WAL).
In my situation, threads seemed much more flexible to implement, and I
probably could
not have done the port without it.
Myron
On Mon, 4 Dec 2000, Ross J. Reedstrom wrote:
> Myron -
> Putting aside the fork/threads discussion for a moment (the reasons,
> both historical and other, such as inter-backend protection, are well
> covered in the archives), the work you did sounds like an interesting
> experiment in code redesign. Would you be willing to release the hacked
> code somewhere for others to learn from? Hacking flex to generate
> thread-safe code is of itself interesting, and the question about PG and
> threads comes up so often, that an example of why it's not a simple task
> would be useful.
>
> Ross
>