Forum OpenACS Q&A: new postgres driver

Collapse
Posted by Dan Wickstrom on
I've commited a new postgres driver version that adds the command blob_select_file. It's used in tcl as follows:

ns_pg blob_select_file $db $lob_id $filename

where:
	db is the database handle
	lob_id is the same lob_id used in the other lob hack commands.
	filename is a file name of your choice.

I've also added a tcl function called "database_lob_to_tcl_string" which is used as follows:

set msg_body [database_lob_to_tcl_string $db $lob_id]

There both only used in the webmail module so far. If anybody encounters any problems with new driver let me know. The changes were minor, so it should work o.k.

Webmail seems to be functional now except for some scalability problems:

  • JDBC Driver is extremly slow
  • Java virtual machine is started each time somebody sends a message
  • Java virtual machine runs out of memory when mail is sent that has a large attachment

But other than those minor problems, it works great :).

Collapse
Posted by Don Baccus on
Great job, Dan!  I should find time to add the rest of the ora8 BLOB functionality to the driver at some point, I only took time to do the  two that ACS required back then.

You've done a great job, wow!  I've not heard back from Peter Mount regarding why the JDBC driver's so slow, I know he was going to be really busy until the weekend.  Hopefully he'll get back to us.

Collapse
Posted by Dan Wickstrom on
Although, I wanted to wait until pg 7 final came out before I upgraded, I might just go ahead and do it this week-end anyway, even if I don't hear from peter.